First things first: the defaults are great and you don't question them, it makes you productive. Starting was the easiest part: - rustup - Decent package manager - Decent config file Cargo.toml - Mostly familiar syntax - Docs in markdown - rustfmt
-
-
Prikaži ovu nit
-
Memory ownership and borrowing felt really weird at first, but it makes total sense. It reveals that we (JS, Java, Python) programmers take GC for granted and just mostly ignore mem management. Also reveals that manual mem management (in C) is *hard*, and Rust wants to helps you.
Prikaži ovu nit -
The Result and Option types nearly everywhere as monads means there is a familiar workflow for functional programmers. It's a weird mix of C and functional programming, but nevertheless felt really familiar to code in. Docs avoid heavy FP jargon though, which IMO is really good.
Prikaži ovu nit -
Lifetime annotations as generic function parameters felt super weird, both in syntax and concept. This is probably the hardest and weirdest part for me. The syntax is especially difficult to appreciate: fn longest<'a>(x: &'a mut Foo) -> &'a Bar
Prikaži ovu nit -
Rustfmt from day one means I don't need to feel silly figuring out what is the best practices in code formatting for this language, I can just code and produce code that looks convincing to other Rust programmers (if you focus only on code style formatting).
Prikaži ovu nit -
But really the biggest deal is that Rust forces you (in a nice way!) to look at all corner cases (errors, mem management) of your code and gently nudges you towards perfection. The feeling of finishing the code and knowing it covers all errors, and is super fast, is fantastic.
Prikaži ovu nit
Kraj razgovora
Novi razgovor -
-
-
That's a great write-up André! I'm a beginner to Rust
and so far I really enjoy the idea of Result<T, E> and Option<T> compared to how it would be handled in JavaScript. It's a real treat. 
-
Saying they are handled in JS it's an overstatement
Kraj razgovora
Novi razgovor -
-
-
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
Last year I followed along with
@garybernhardt compiler video using Rust. What you’re saying matches my experience exactly. Thanks for writing down what I should haveHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.