I wish this was valid: let (l, r) = [1u8, 2u8];
-
-
Replying to @yoshuawuyts1 reply 0 retweets 1 like
-
Replying to @killercup
destructure into a tuple from an array: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=98aeaa156ac1fa54d24a7e2cbe1fade2 …
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts @killercup
Or more specifically: I wish I could index into a tuple as if it were an array. I believe the in-memory representation of the two is identical. Being able to switch between the two would be useful for certain cases!
2 replies 0 retweets 2 likes -
Replying to @yoshuawuyts @killercup
I think the reason for not being able to do that is (1, "123"); is a valid tuple - they allow heterogeneous types... unlike arrays.
1 reply 0 retweets 5 likes -
Replying to @ayourtch @killercup
*ahhhh* -- yes okay that's an excellent point!
1 reply 0 retweets 3 likes
*deletes paragraph from blog post*
2:35 PM - 7 Sep 2019
0 replies
0 retweets
1 like
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.