That said, Rust’s domain does seem wider than just systems programming. It has the right abstractions to be suitable for (edit: some) higher level things like web apps.
Personally Rust is turning into what I was assuming and hoping Go was going to turn into back in 2010: a static language that does most of what we all used dynamic languages for, without too much extra difficulty. (That is, after you get used to the borrow checker’s rules.)
Frankly any language that makes me write "some string".into(), and all of the other nonsense of Rust, is not suitable for writing string processing applications (as opposed to utilities, such as ripgrep). The business logic of any Rust application that deals mostly with strings is hopelessly obtuse and/or obscured. Languages like Perl, Python and Ruby, or even JavaScript and Java, are more suitable.
Rust focuses on and succeeds at being an improved C++, no reason to use it for everything.
Do you have any hypotheses about why we don't see as much publicity for Haskell then?
I think Haskell is just too abstract for most of us. I love Rust traits and see how it directly came from Haskell but I couldn’t learn Haskell even after like 3 serious tries. Maybe a good portion of the problem is in the documentation and not the language? That said, the extremist purity is simply impractical compared to Rust which gets 90% of the way there without forcing all the architectural dances Haskell does. Just my opinion.
I can't add much to the Haskell part as I've only ever used it sparingly. In many aspects, I view Rust as only having one or two small things that are new (or at least new in a non-research programming language). Its big strength is combining a lot of existing good ideas in a principled manner.
Not too bad for an abstract experimentation.
Add a single other resource, and now you need resource management. Once you have resource management, memory is the easiest thing to plug into it.
If you start out having resource management, you never wonder whether GC would be a good idea. GC turns into a solution desperately looking for a problem, and finding none in your neighborhood.
That explains why it was so hard for me to learn: I'm awful at math. The most advanced math I could understand was high school algebra.
There are plenty of such people, and they need something to do that keeps them out of the way of people interested in solving real problems efficiently.
I think I see more posts about Haskell than Rust here on HN. (What makes sense, since fits a larger set of applications.)
Of course, Rust gives you a lot in exchange for the reduced velocity--safety and performance; however, those are tradeoffs and we should talk about them as such. It feels dishonest to present Rust as "as productive as Python" even with the "(given enough experience)" caveat.
It really depends on how you measure productivity.
But also, I don’t think that “makes you think about memory” is that simple. I don’t have to think about memory in Rust very often at all: that’s what the compiler is for! When I make a mistake, it corrects me, and I’ve only thought about it for a few moments.
> But also, I don’t think that “makes you think about memory” is that simple. I don’t have to think about memory in Rust very often at all: that’s what the compiler is for! When I make a mistake, it corrects me, and I’ve only thought about it for a few moments.
Ok, you don't think about it, but the back-and-forth with the compiler still takes a nonzero amount of time that you don't have to deal with in a GC language. At least not until you start to hit upon GC performance issues, at which point the value proposition shifts in Rust's favor, which ultimately brings me back to my point about it being an issue of tradeoffs and my skepticism about Rust-as-silver-bullet.
But you do pay up front! That's a big deal if your design is not set in stone (which is not a synonym for "prototyping").
(Again, as always, YMMV.)
> Lots of these things that look like syntax problems are in fact design problems surfaced by the compiler.
A lot of people are finding value in the rules Rust provides. This is irrespective of domain. The strict compiler helps you refactor code in ways that less strict languages don't. You still can do it, of course, you just have a lot less help.
The trick is, is the initial hit in productivity worth it, until you get up to speed?
That said, of course everything doesn't need to be in Rust. But there's a reason it's finding broader appeal than purely systems stuff.