My reaction to Rust enums:https://www.youtube.com/watch?v=kwFr6qHuv7Q …
-
-
Please someone tell me that you get used to String vs str
4 replies 0 retweets 7 likesShow this thread -
Defining methods can be weird at first, but it looks very similar to go. You create an `impl`ementation block and define functions that take self as their first argument.
1 reply 0 retweets 1 likeShow this thread -
BTW, I think methods and static fields are called associated items here. Reading this right now: https://doc.rust-lang.org/reference/items/associated-items.html#associated-items …
1 reply 0 retweets 1 likeShow this thread -
I thought there was no way to force people to use your constructors, but there is! I still haven't played with that, but there's hope
3 replies 0 retweets 3 likesShow this thread -
There's no function overload!
I found this, but seems complicated:https://medium.com/@jreem/advanced-rust-using-traits-for-argument-overloading-c6a6c8ba2e17 …3 replies 0 retweets 3 likesShow this thread -
Being able to redeclare a variable in the same scope is wild! Most linters from other languages will complain about shadowing, but it's common practice in
#rustlang.1 reply 0 retweets 5 likesShow this thread -
I keep reading about enums. They are neat. I guess most things are represented with them. There's also C-like enums. Those just have "integer" values, and are defined in the same way as the fancy ones.
2 replies 0 retweets 3 likesShow this thread -
Tweeting about this resulted to be useful. Thanks to everyone answering my questions!
1 reply 0 retweets 6 likesShow this thread -
I wonder why the type of integer numeric literals is i32 by default. I don't have enough experience outside of x86 and modern android and ios development, so I was expecting a language this new to default to i64, or maybe to the word size. Any clue?
6 replies 0 retweets 2 likesShow this thread
The book notes: > integer types default to i32: this type is generally the fastest, even on 64-bit systems. — https://doc.rust-lang.org/book/ch03-02-data-types.html …
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.