Live data from Hacker News

Rust is Software's Salvation

redox-os.org

61–70 of 182 posts

Re: Rust is Software's Salvation

#61

Captain Obvious here with a public service announcement: Rust's safety guarantees dont extend to logic or protocol implementation problems or misconfigured security settings.the part of the article about service providers leaking creds or other info...Rust all the things and that will still happen. Some of this stuff is just too much. Also, why not work on lifetime and memory safety in a c based language? Rust looks…

There are ways to prevent some logic/protocol problems at the type level using rust:

https://hoverbear.org/2016/10/12/rust-state-machine-pattern/

https://blog.tarn-vedra.de/posts/phantom-types-for-safe-apis...

https://insanitybit.github.io/2016/05/30/beyond-memory-safet...

https://scribbles.pascalhertleif.de/elegant-apis-in-rust.htm...

Some libraries use such features to prevent certain kinds of nonce-reuse during encryption (one of the more common ways of screwing up encryption). These constraints are checked at compile-time.

Such guarantees are not possible with weaker type systems like that of C.

Re: Rust is Software's Salvation

#62
post #16

The amount of hype Rust is getting is not going to end well for Rust. This reminds me of Ruby during 2007-2010 where it went from Patron Saint to Scapegoat for every startup that failed using it. Ruby survived it, and I'm sure Rust will too, but that doesn't make it obnoxious for everyone else who inevitably gets swept up in the craze and crash. Programming is hard. Programming will always be hard. Better/newer tools…

I agree. C is fast because it can be unsafe. Skip all the safety checks and run like hell (if you need or want to). We don't care what size that array is, we just want to go really fast. Safety checks come with a performance cost. Rust claims to be faster than C and safer than C at the same time. That's not possible.

>Rust claims to be faster than C and safer than C at the same time. That's not possible.

Of course it's possible. Say you would fork gcc (or clang) and teach it a few extensions for the C type system that allow some more safety checks at compile time (for example something similar to Rusts borrow checker). Since those checks don't change the generated code, you now have a language that's safer than C, but equally fast. Now you add some language primitives that make it easier for the compiler to understand the intend of the programmer, making it easier to optimize the code (there are already plenty of opportunities used by C extensions, like signaling that some if branch is unlikely to be taken. More opportunities exist if you modify the language more heavily). Now you have a language that's both safer and faster than C.

I don't want to make any claims about Rust performance in practice, I haven't run enough benchmarks for that. But it's perfectly possible that the statement could be true.

Re: Rust is Software's Salvation

#63
post #56

The reality is Rust will never be mainstream because 95% of the dev use php / ruby / python / java / c# and Rust is far too complicated to switch from those. That's where imo Go will prevail, it's a simpler language that is easy to use / learn.

We have a lot of Ruby/Python/JavaScript developers using Rust. They handle it just fine.

Re: Rust is Software's Salvation

#64

The amount of hype Rust is getting is not going to end well for Rust. This reminds me of Ruby during 2007-2010 where it went from Patron Saint to Scapegoat for every startup that failed using it. Ruby survived it, and I'm sure Rust will too, but that doesn't make it obnoxious for everyone else who inevitably gets swept up in the craze and crash. Programming is hard. Programming will always be hard. Better/newer tools…

The echoes of Golang hype right now are somewhat ominous. A few years ago it was "concurrency primitives are going to change your life" and now it's "lifetime/ownership primitives are going to change your life." I am somewhat disappointed that we still feel the need to create entirely new toolchains and rewrite everything just to support what should be an incremental improvement. But at a certain point, a lot of the…

If we were betting money, I'd put mine on Golang over Rust just because of the piles of money and effort Google keeps pouring into it. Rust is a little cooler, but I just don't see Mozilla having enough resources to keep-up the momentum long-term.

Re: Rust is Software's Salvation

#65

Earlier quoted context omitted.

The echoes of Golang hype right now are somewhat ominous. A few years ago it was "concurrency primitives are going to change your life" and now it's "lifetime/ownership primitives are going to change your life." I am somewhat disappointed that we still feel the need to create entirely new toolchains and rewrite everything just to support what should be an incremental improvement. But at a certain point, a lot of the…

If we were betting money, I'd put mine on Golang over Rust just because of the piles of money and effort Google keeps pouring into it. Rust is a little cooler, but I just don't see Mozilla having enough resources to keep-up the momentum long-term.

These piles of money don't seem to be amounting to much because rust is still an objectively far superior language.

Google is not a language company and doesn't hire good language people so I don't see this changing.

Disclaimer: I work for Google

Re: Rust is Software's Salvation

#66

Earlier quoted context omitted.

The echoes of Golang hype right now are somewhat ominous. A few years ago it was "concurrency primitives are going to change your life" and now it's "lifetime/ownership primitives are going to change your life." I am somewhat disappointed that we still feel the need to create entirely new toolchains and rewrite everything just to support what should be an incremental improvement. But at a certain point, a lot of the…

If we were betting money, I'd put mine on Golang over Rust just because of the piles of money and effort Google keeps pouring into it. Rust is a little cooler, but I just don't see Mozilla having enough resources to keep-up the momentum long-term.

Unfortunately, golang is just a different league.

Re: Rust is Software's Salvation

#67
post #19
post #5

The best defense is a good offense. What is scaring all of the Rust developers and users so badly that they feel the need to go on such an offensive hype campaign? It's worse than the phase Java went through when it hit its peak. I'll be honest. Until we start seeing some more balanced (frankly, I'd settle for nuanced) discussion about the compromises made to get Rust's strengths, I'm staying the hell away from it.

>It's worse than the phase Java went through when it hit its peak. As a person who lived through the 1990s Java hype and had a bookshelf full of the official Java books (Addison-Wesley white books)[1], the Rust evangelism is nowhere near that level. To refresh the memory, 1990s Java evangelists predicted: 1) C/C++ would become obsolete because in the age of abundant desktop resources (cpu power and more RAM), the GC…

[deleted]

Re: Rust is Software's Salvation

#68

The amount of hype Rust is getting is not going to end well for Rust. This reminds me of Ruby during 2007-2010 where it went from Patron Saint to Scapegoat for every startup that failed using it. Ruby survived it, and I'm sure Rust will too, but that doesn't make it obnoxious for everyone else who inevitably gets swept up in the craze and crash. Programming is hard. Programming will always be hard. Better/newer tools…

The echoes of Golang hype right now are somewhat ominous. A few years ago it was "concurrency primitives are going to change your life" and now it's "lifetime/ownership primitives are going to change your life." I am somewhat disappointed that we still feel the need to create entirely new toolchains and rewrite everything just to support what should be an incremental improvement. But at a certain point, a lot of the…

Move semantics, man.

I don't personally divide my life into "before move semantics" and "after move semantics" - but thanks to move semantics, I have to anyway. And I feel like I'm all the better for it.

Re: Rust is Software's Salvation

#69

Earlier quoted context omitted.

If we were betting money, I'd put mine on Golang over Rust just because of the piles of money and effort Google keeps pouring into it. Rust is a little cooler, but I just don't see Mozilla having enough resources to keep-up the momentum long-term.

These piles of money don't seem to be amounting to much because rust is still an objectively far superior language. Google is not a language company and doesn't hire good language people so I don't see this changing. Disclaimer: I work for Google

No argument on superior, it's just that superior doesn't win the day. Look at C++. Look at JavaScript. It would be surprising if the industry made the better choice for a change.

Re: Rust is Software's Salvation

#70

Earlier quoted context omitted.

If we were betting money, I'd put mine on Golang over Rust just because of the piles of money and effort Google keeps pouring into it. Rust is a little cooler, but I just don't see Mozilla having enough resources to keep-up the momentum long-term.

These piles of money don't seem to be amounting to much because rust is still an objectively far superior language. Google is not a language company and doesn't hire good language people so I don't see this changing. Disclaimer: I work for Google

[deleted]
Post reply on HN