News for hackers. Stuff that matters.
Re:What is Rust and why is it so popular? by sdegutis on Tuesday January 21, 2020 @11:26AM (#22108339)
I think this is misplaced causation. Don’t discount the fact that a significant number of programmers just like novelty and like Rust because it’s new in the same way Haskell is new to a Java dev.

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.)

Re:What is Rust and why is it so popular? by crystaldev on Tuesday January 21, 2020 @03:02PM (#22110892)
> higher level things like web apps.

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.

Re:What is Rust and why is it so popular? by iopq on Saturday January 25, 2020 @11:46PM (#22150434)
If "some string".into() is your #1 complaint you haven't used Rust enough
Re:What is Rust and why is it so popular? by sdegutis on Tuesday January 21, 2020 @03:16PM (#22111031)
Web frameworks convert strings to business logic, web apps deal only in business logic. Fortunately the web framework is only written once to support multiple web apps.
Re:What is Rust and why is it so popular? by crystaldev on Tuesday January 21, 2020 @03:18PM (#22111058)
That sounds nice, but practically a lot of web app development can't be perfectly modeled by a type system. There's a lot of string munging and bashing, because at the end of the day we deal with messy human inputs, and the required bookkeeping makes that tedious and inexpressive in Rust.
Re:What is Rust and why is it so popular? by shepmaster on Tuesday January 21, 2020 @01:20PM (#22109718)
> because it’s new in the same way Haskell is new to a Java dev

Do you have any hypotheses about why we don't see as much publicity for Haskell then?

Re:What is Rust and why is it so popular? by sdegutis on Tuesday January 21, 2020 @02:43PM (#22110711)
Hey nice to see you here, your SO posts have tremendously helped me learn Rust.

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.

Re:What is Rust and why is it so popular? by shepmaster on Tuesday January 21, 2020 @02:58PM (#22110850)
You are quite welcome!

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.

Re:What is Rust and why is it so popular? by sdegutis on Tuesday January 21, 2020 @03:20PM (#22111076)
I’d agree, basically Haskell is focused on academic purity and abstract experimentation while Rust is focused on being equally practical and innovative at the same time.
Re:What is Rust and why is it so popular? by vperez on Tuesday January 21, 2020 @03:44PM (#22111334)
Haskell is actually used by companies to solve practical problems, a non trivial example being Facebook: https://www.youtube.com/watch?v=mlTO510zO78

Not too bad for an abstract experimentation.

Re:What is Rust and why is it so popular? by zozbot234 on Tuesday January 21, 2020 @06:32PM (#22112939)
Haskell is easier to learn than Rust because it's literally just math. There is no "dropping" variables and no need to side-step the lack of GC, because you never "drop" a variable that you've stopped using in a math proof. You just let the GC deal with all that stuff. And you don't have a "stack" vs. "heap" distinction, instead you work directly in terms of function arguments and the returned values. You have currying so you can work naturally with parameterized and partially-applied functions, just like in math, etc. Lazy evaluation for "infinite" sequences and objects. That kind of stuff.
Re:What is Rust and why is it so popular? by ncmncm on Wednesday January 22, 2020 @12:37AM (#22114922)
GC is OK if the only resource your program needs to manage is RAM; and, in particular if time is not among them. There are many such programs, including the favorites of Computer Science, such as compilers.

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.

Re:What is Rust and why is it so popular? by sdegutis on Tuesday January 21, 2020 @07:02PM (#22113160)
> Haskell is easier to learn than Rust because it's literally just math.

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.

Re:What is Rust and why is it so popular? by ncmncm on Wednesday January 22, 2020 @12:43AM (#22114945)
Haskell is great if you would rather be doing maths than solving actual, real-world problems. And, either don't care about performance, or like subverting your design to get it.

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.

Re:What is Rust and why is it so popular? by marcosdumay on Tuesday January 21, 2020 @04:21PM (#22111721)
Don't we?

I think I see more posts about Haskell than Rust here on HN. (What makes sense, since fits a larger set of applications.)

Re:What is Rust and why is it so popular? by discreteevent on Tuesday January 21, 2020 @05:44PM (#22112560)
Were you there when Haskell was new to the mainstream? For a few years there seemed to be nothing else on proggit.
Re:What is Rust and why is it so popular? by slx26 on Tuesday January 21, 2020 @02:08PM (#22110267)
sorry for the tangent, but what has Go turned into in your opinion? (I'd believe it fits quite well your definition)
Re:What is Rust and why is it so popular? by sdegutis on Tuesday January 21, 2020 @02:44PM (#22110728)
It seems to have remained pretty much exactly as it arrived.