Can someone sell me on using rust over python? I am just gernerally curious as to the advantage beyond rust being compiled.
Rust 1.24
21–30 of 215 posts
Re: Rust 1.24
#22Incremental compilation! And it's only going to incremental-er from here, as the compiler learns how to cache more and more sorts of interim artifacts to avoid redundant work. Though I think the wording in the OP is a bit off: > Historically, the compiler has compiled your entire project, no matter how little you’ve changed the code. This isn't quite correct. When you change the code in a given library, it has histor…
Have there been any thoughts around making the compiler something akin to a stateful server with an embedded datastore for the caching rather than using the filesystem?
Re: Rust 1.24
#23Can someone sell me on using rust over python? I am just gernerally curious as to the advantage beyond rust being compiled.
+ Static typing (extra safety, robust refactoring, code completion etc.)
+ Much much faster and less memory use
+ Compiles to a relatively standalone binary (not as good as Go though)
+ No Python 2/3 nonsense to deal with
- Much more complicated. You have to deal with lifetimes and borrowing and so on. It's really very difficult and we still don't know how to write some types of programs nicely (e.g. GUIs)
- Slow compilation times
- Can get pretty verbose and full of type boilerplate
Honestly if I was coming from Python I think I would switch to Go first. It is still way faster than Python, has a very nice "batteries included" standard library, static typing, very fast compilation and makes nice static binaries. The downside compared to Python is that it isn't very expressive at all - you'll find yourself writing out loops where you might have used a one-line list comprehension or something in Python.
Re: Rust 1.24
#24Re: Rust 1.24
#25Re: Rust 1.24
#26Satisfying to see rustfmt hitting stable, even if only in preview form.
Re: Rust 1.24
#27Can someone sell me on using rust over python? I am just gernerally curious as to the advantage beyond rust being compiled.
Performance is quite a bit higher for rust. And it's a much safer language by design (and forces the programmer to be as such). That said, development time in Python is much faster. Honestly, it depends on what you're building.
Edit: The only big thing I can think of is the safety of compile-time type checking to ensure you won't end up with some kind of runtime error from mismatched types. Is there something I'm missing?
Re: Rust 1.24
#28Is rustfmt fast enough to reasonable be put on a save hook?
Re: Rust 1.24
#29Can someone sell me on using rust over python? I am just gernerally curious as to the advantage beyond rust being compiled.
Think about your domain problem, don't worry about CS and perf
Use the REPL to "touch data with your own hands"
Rustlang:
Fast, fast, fast
Everything bundled inside a single binary that you can just ship - no dependency hell for your users
Re: Rust 1.24
#30Can someone sell me on using rust over python? I am just gernerally curious as to the advantage beyond rust being compiled.
They really very different but... + Static typing (extra safety, robust refactoring, code completion etc.) + Much much faster and less memory use + Compiles to a relatively standalone binary (not as good as Go though) + No Python 2/3 nonsense to deal with - Much more complicated. You have to deal with lifetimes and borrowing and so on. It's really very difficult and we still don't know how to write some types of prog…
Whats the difference?