Wrote about language contexts https://blog.yoshuawuyts.com/contexts/ (I'm not a language designer, so add grains of salt accordingly.)
-
Show this thread
-
Replying to @yoshuawuyts
nice, I am already doing fallible iterators (sync right now, will make them async later) and one other annoying thing is you can't use (?) to yield an error inside of your next() implementation. using this macro right now to wrap errors in a return Some() https://github.com/peermaps/eyros/blob/04e34d8ef9d1cdbd1e7d7795ba3d4714cf7bcddf/src/tree.rs#L41-L48 …
1 reply 1 retweet 2 likes -
Replying to @substack @yoshuawuyts
for making `stream?` thing work nicer, I think it'd be really cool if you could use a ? with destructuring in the loop args: `for stream? in listener.incoming() {}`
1 reply 0 retweets 1 like -
Replying to @substack @yoshuawuyts
and that syntax would be really handy in other situations too. for example you could unpack result types inside of tuples in one go: let (a?,b?) = whatever();
2 replies 0 retweets 0 likes -
Replying to @substack @yoshuawuyts
would this unpack Option<(A, B)> or (Option<A>, Option<B>)?
2 replies 0 retweets 1 like
The latter. The former can already be unpacked by doing: let (a, b) = whatever()?;
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.