Nothing yet and nothing planned for the next month and a half at least, so feel free to start anywhere you want.
Iâve been working on something the last few days.
I started with std::fs
, which was rather trivial to create an abstract layer for (since itâs already pretty cleanly seperated) and Iâm currently shuffling around std::net
.
Would love to hear some thoughts about it.
edit: Whoops, forgot the link: https://github.com/rust-lang/rust/compare/master...panicbit:portability
Neat! I looked over the diff so far and it all looks reasonable to me. The main question I have that you might have a better look at since youâve touched the code: does this actually reduce the interdependencies such that it could be separated out into a different crate?
Yes! I intend to make ::pal an external crate at some point. Interdependencies are supposed to expressed by using associated types on the trait (possibly reusing traits for other modules). ::pal currently depends on ::io::Result and ::time::SystemType, but the former can be moved to ::pal and reexported by libstd and the latter probably will find itâs place as abstraction in ::pal::time.
jethrogb rustlang@discoursemail.com schrieb am Mi., 26. Juli 2017, 22:54:
What about things like std::path
?
I havenât looked at std::path yet, but I assume that it should be no different than the other modules.
impl Trait
in structs would be nice to avoid accidentally calling non-trait methods (especially inherent methods with the same name are a risk)
On that note, would all these traits and associated types cause error messages to blow up in complexity for the end-user?
The end user? Users of the libstd wonât see any of that and implementors of the backends would at most see a bunch of âthis function is missing in this impl for SomeTraitâ once per missing function instead of everytime per use of a function. Also, the error messages are generally much friendlier since theyâll also include the types.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.