Live data from Hacker News

Considering Rust [video]

youtube.com

21–30 of 46 posts

Re: Considering Rust [video]

#21
post #7

I'm 20 minutes in and he's spending a lot of time talking about how Rust gets correctness right. Are there any anecdotal stories about how Rust programs have fewer errors? Facebook, for example, rewrote Messenger with ReasonML: https://reasonml.github.io/blog/2017/09/08/messenger-50-reas... And it had a lot fewer bugs: "Messenger used to receive bugs reports on a daily basis; since the introduction of Reason, there h…

Rust certainly makes some bugs impossible. But I don't think comparing #bugs of rewrites to the original is ever fair.

Re: Considering Rust [video]

#22
post #15

Can somebody please explain why Rust has so much buzz right now compared to scala? Scala is a strongly typed, very-well vetted, functional programming language in the JVM. It pretty much has everything going for it. It's even adopted by twitter.

JVM, garbage collected, doesn't have zero overhead abstractions. Might as well ask why Scala didn't take over from C++.

> JVM, garbage collected, doesn't have zero overhead abstractions.

Is it fair to say that the significance of those points are these?

no JVM: easier deployment

not garbage collected: less latency

zero-overhead abstraction: smaller in memory

Re: Considering Rust [video]

#23
post #15

Earlier quoted context omitted.

JVM, garbage collected, doesn't have zero overhead abstractions. Might as well ask why Scala didn't take over from C++.

I don't know why you'd be dismissive of that comparison. Scala is more like Rust than any other language he discusses.

I mean sure, Scala is a great language and has a lot more in common with Rust than most languages, but it's fundamentally designed for a different role than Rust. Rust is designed as a "systems language", whereas Scala's dependence on the JVM is a non-starter for such a role.

You could say instead that Rust is a Scala-inspired systems language. Not just Scala, obviously, but by functional programming concepts like algebraic data types and type inference. Rust isn't even really a functional language itself; it's still an imperative language.

Re: Considering Rust [video]

#24
post #15

Earlier quoted context omitted.

JVM, garbage collected, doesn't have zero overhead abstractions. Might as well ask why Scala didn't take over from C++.

> JVM, garbage collected, doesn't have zero overhead abstractions. Is it fair to say that the significance of those points are these? no JVM: easier deployment not garbage collected: less latency zero-overhead abstraction: smaller in memory

Yes, and more to the point said qualities make Rust suitable for use in kernel-type systems and embedded progamming, whereas any JVM or other GC and VM based language generally isn't.

Re: Considering Rust [video]

#25
post #12
post #8

Earlier quoted context omitted.

I don't think Rust has reached wide acceptance yet. Sure there are companies that use it, but I bet you'd have a hard time convincing your manager that Rust is widely accepted in industry. Anyway, I certainly appreciate all of the posts.

Not widely accepted in industry, but widely accepted (or at least known) among HN readers

Which is a very small percentage of people in tech. In my network Rust is still very new to unknown in some tech companies. I will say Go is more the language that emerged.

Re: Considering Rust [video]

#26
post #7

I'm 20 minutes in and he's spending a lot of time talking about how Rust gets correctness right. Are there any anecdotal stories about how Rust programs have fewer errors? Facebook, for example, rewrote Messenger with ReasonML: https://reasonml.github.io/blog/2017/09/08/messenger-50-reas... And it had a lot fewer bugs: "Messenger used to receive bugs reports on a daily basis; since the introduction of Reason, there h…

Last year, npm rewrote a CPU-bound service in Node.js, Go, and Rust. They noted that the Rust version took the longest to write, but had basically no issues at runtime.

https://www.rust-lang.org/static/pdfs/Rust-npm-Whitepaper.pd...

Excerpt:

> npm’s first Rust program hasn't caused any alerts in its year and a half in production. "My biggest compliment to Rust is that it's boring," offered Dickinson, "and this is an amazing compliment." The process of deploying the new Rust service was straight-forward, and soon they were able to forget about the Rust service because it caused so few operational issues. At npm, the usual experience of deploying a JavaScript service to production was that the service would need extensive monitoring for errors and excessive resource usage necessitating debugging and restarts.

Re: Considering Rust [video]

#27
post #15

Earlier quoted context omitted.

JVM, garbage collected, doesn't have zero overhead abstractions. Might as well ask why Scala didn't take over from C++.

I don't know why you'd be dismissive of that comparison. Scala is more like Rust than any other language he discusses.

Because performance is a P0 concern to a lot of people. Rust (and C++) has performance as a primary goal, Scala does not.

Re: Considering Rust [video]

#28
post #7

I'm 20 minutes in and he's spending a lot of time talking about how Rust gets correctness right. Are there any anecdotal stories about how Rust programs have fewer errors? Facebook, for example, rewrote Messenger with ReasonML: https://reasonml.github.io/blog/2017/09/08/messenger-50-reas... And it had a lot fewer bugs: "Messenger used to receive bugs reports on a daily basis; since the introduction of Reason, there h…

> Are there any anecdotal stories about how Rust programs have fewer errors?

My anecdote is that programming in Rust intuitively "feels" like programming in languages like OCaml or Haskell, which have a reputation for "you'll often spend a lot of time fighting the compiler, but when your program finally does compile, it's much more likely to work correctly on the first run than other languages (e.g. C, C++)."

Re: Considering Rust [video]

#29
post #27

Earlier quoted context omitted.

I don't know why you'd be dismissive of that comparison. Scala is more like Rust than any other language he discusses.

Because performance is a P0 concern to a lot of people. Rust (and C++) has performance as a primary goal, Scala does not.

Did you even watch the video? The guy is comparing rust to things like Python which is a pretty silly comparison, relative to scala.

Re: Considering Rust [video]

#30
post #2

I've been getting into Rust lately and really enjoying it so far. Coming from JavaScript, It can feel a bit verbose at times and I'm still trying to get an intuitive grasp of ownership but it feels like a really small cost compared to say C/C++. A nice bonus is that it has very good support for WebAssembly/Node.js which makes it easy to start using Rust for some JavaScript modules without having to re-write the whole…

I felt the same, coming from JavaScript and Python. Then I realised "verbosity" is actually "the language demanding you be crystal clear about what you're asking and that every code path is covered."

I just can't go back. Typescript gives me most of this. But Python feels just awful to me now. It's like an entire kind of cognitive load is being eliminated from my day.

Post reply on HN