Live data from Hacker News

#[you_can::turn_off_the_borrow_checker]

docs.rs

21–30 of 35 posts

Re: #[you_can::turn_off_the_borrow_checker]

#21
post #18
post #16

Earlier quoted context omitted.

You really think things will improve by essentially wrapping entire Rust programs in a huge unsafe block? Rust isn't targeting the NodeJS crowd at large. It is targeting the systems programming and C++ crowd. And spoken by someone who still has his C++98 hardcover by Stroustrup on his shelf, the alternatives in that space are not one iota easier. The fact that C++ does not mandate the use of smart pointers and requir…

You very evidently did not read what I wrote. And, if you imagine Rust has already succeeded, or that its future is assured, you have not been paying attention elsewhere, either. Failure is absolutely the norm for programming languages.

Rust is powering core, critical infrastructure at AWS like Lambda and Fargate through Firecracker. https://firecracker-microvm.github.io/

The Linux kernel is actively looking at submissions in a language other than C for the first time in 30 years. https://arstechnica.com/gadgets/2021/03/linus-torvalds-weigh...

It is a primary language source for WebAssembly.

That is already MUCH further than either D or Dart ever got in their respective spheres.

Folks (including many with a lot of money) are noticing that Rust instead of C or C++ means 70% fewer CVEs leading to security breaches. https://msrc-blog.microsoft.com/2019/07/22/why-rust-for-safe...

I think there's a place for a lot of players: TypeScript, Python, Go, etc.

Rust however is not just an interesting side step like most languages that cannot point to real, measurable gains. When there are a limited number of languages that can fill a niche (systems, highest performance, limits on memory consumption), one of them has demonstrable improvements in ergonomics, stability, and security, and it has funding from an array of deep pockets, it would be a fool's errand to discount it even if it has a steeper learning curve than Python.

Re: #[you_can::turn_off_the_borrow_checker]

#22
post #21
post #18

Earlier quoted context omitted.

You very evidently did not read what I wrote. And, if you imagine Rust has already succeeded, or that its future is assured, you have not been paying attention elsewhere, either. Failure is absolutely the norm for programming languages.

Rust is powering core, critical infrastructure at AWS like Lambda and Fargate through Firecracker. https://firecracker-microvm.github.io/ The Linux kernel is actively looking at submissions in a language other than C for the first time in 30 years. https://arstechnica.com/gadgets/2021/03/linus-torvalds-weigh... It is a primary language source for WebAssembly. That is already MUCH further than either D or Dart ever go…

Your choice to compare Rust to D and Dart reveals all.

If you imagine that Amazon could not rewrite firecracker in a week, you are not paying attention. If you imagine that the Linux kernel has any Rust code in it, you are not paying attention.

Python, JavaScript, Java, C++, C, and Fortran got miracles. Myriad others did not. Miracles are not awarded for merit, but are reliably denied for failure to act to seize them. (C++ very nearly lost its, before 2011.) Rust has not got one. Rust still, just barely conceivably, could find one. Failing to take steps in that direction is a binding choice.

Re: #[you_can::turn_off_the_borrow_checker]

#23
post #22
post #21

Earlier quoted context omitted.

Rust is powering core, critical infrastructure at AWS like Lambda and Fargate through Firecracker. https://firecracker-microvm.github.io/ The Linux kernel is actively looking at submissions in a language other than C for the first time in 30 years. https://arstechnica.com/gadgets/2021/03/linus-torvalds-weigh... It is a primary language source for WebAssembly. That is already MUCH further than either D or Dart ever go…

Your choice to compare Rust to D and Dart reveals all. If you imagine that Amazon could not rewrite firecracker in a week, you are not paying attention. If you imagine that the Linux kernel has any Rust code in it, you are not paying attention. Python, JavaScript, Java, C++, C, and Fortran got miracles. Myriad others did not. Miracles are not awarded for merit, but are reliably denied for failure to act to seize them…

Where was Python in 2002 when it was only 11 years old?

Not every language can piggyback on the first scriptable web browsers or on IBM mainframes.

I see Rust's miracle as industry adoption in cloud infrastructure even though every software engineer in that sphere already has (typically decades of) experience in C and/or C++.

Its miracle is that after all these apps were (re)written, it was not followed by the typical tidal wave (or even a steady stream) of severe CVEs that have always accompanied systems-level languages.

Most folks don't need Rust, will probably never need Rust. That's okay. A huge proportion of developers never need C, C++, or any of the myriad assembly languages.

But folks in that sphere know how fraught the systems-level languages are both from a security perspective and a packaging perspective (where's the cargo equivalent in C++ in 2022?). They are looking at their colleagues and watching the list of CVEs.

Their choices: • Zig: better than C, simpler than Rust, but very immature, and not as memory safe or thread safe as Rust • Ada: established, used by DoD, not as memory safe or thread safe as Rust (see: severe CVE causes) • Go: much shallower learning curve than Rust, but garbage collector makes it unsuitable for systems-level. Much less flexible than Rust. • Fortran: no intrinsic standard support for Unicode-aware I/O, memory safety is lower than Rust. Fortran is a muscle car with great straight line performance for scientific processing but has always struggled with general app space due to its design. • Nim: interesting alternative to C, but nowhere near mature or stable enough for general deployment in the real world. • C: dead simple with plenty of foot guns. In fairness, C taught us where a lot of the foot guns were in programming. 50+ years later, it's obvious from the CVEs that humans need some guardrails. • C++: More complex than Rust, a back history that preclude solving its worst design issues, and coupled with subtle firearms that blow your whole leg off. No standard packaging or module repositories available. Severe CVEs galore. Has spawned entire swaths of new languages just to avoid using it. (See: Java)

Rust is arguably the first popular language outside the DoD that can reliably take jobs from C++ with tremendously and measurably better reliability without compromise on resource usage.

There's a reason Linus Torvalds and the other core kernel developers never wanted C++ anywhere near the Linux kernel but are cautiously optimistic about and open to Rust development in that space.

It's not about hype; it's about the necessity of reducing the security-related blast radius even at the lowest levels of hardware and the embedded space. Everything above that level is just gravy.

I would NEVER consider writing web server software or cloud functions in C or C++ in 2022. I would consider it irresponsible. I'd write them in Rust in a heartbeat though if performance demanded it. Many others feel the same way.

All together, that's what I see as Rust's miracle.

Re: #[you_can::turn_off_the_borrow_checker]

#24
post #23
post #22

Earlier quoted context omitted.

Your choice to compare Rust to D and Dart reveals all. If you imagine that Amazon could not rewrite firecracker in a week, you are not paying attention. If you imagine that the Linux kernel has any Rust code in it, you are not paying attention. Python, JavaScript, Java, C++, C, and Fortran got miracles. Myriad others did not. Miracles are not awarded for merit, but are reliably denied for failure to act to seize them…

Where was Python in 2002 when it was only 11 years old? Not every language can piggyback on the first scriptable web browsers or on IBM mainframes. I see Rust's miracle as industry adoption in cloud infrastructure even though every software engineer in that sphere already has (typically decades of) experience in C and/or C++. Its miracle is that after all these apps were (re)written, it was not followed by the typica…

Pretending Rust has already got a miracle will suffice to deny it one. The window does not open long, or wide. Not choosing is a choice.

Re: #[you_can::turn_off_the_borrow_checker]

#26
post #14

If Rust is not to fizzle like Ada (which got overwhelmingly more investment than Rust has had) it needs a radically faster adoption rate. While several traps imperil Rust's wider adoption -- pathetic compile speed is another: consider JIT in the compiler! -- the borrow checker is an important roadblock for beginners. There is no practical need to enforce borrow checking on all debug builds: it suffices, for beginners…

> If Rust is not to fizzle like Ada [...] it needs a radically faster adoption rate

I would challenge this. Adoption rate does not mean longevity. There are many flash-in-the-pan technologies that are here one year and gone a few later.

As a concrete example, the adoption rate of Ruby on Rails was nearly vertical in around 2006. PHP was old, boring, adoption was flat if not declining. ROR looked to become become king of the web. Today ROR is largely a legacy technology, a footnote at best. PHP is still here, though. It will likely outlast node, too, despite being an awful language.

Large-scale adoption is a slow march through the decades, and has a lot more with momentum than anything else. A big reason why these antique languages have such sticking power is that they have a mature and well-established ecosystem. If you want a new language to join them, that is where the focus should be.

Re: #[you_can::turn_off_the_borrow_checker]

#27
post #20
post #19

Earlier quoted context omitted.

Maybe you misunderstood. Rust is already used widely in certain industries and quickly growing in many others. It’s not a question of if rust will succeed at this point. It already has. It’s soon to be allowed in upstream Linux kernel drivers, for example.

Certainly you misunderstood: more people pick up C++ for production use every week than the total employed today coding Rust. That will be true next year, too. More are employed coding Ada than Rust. More code Erlang than Rust. More code Forth than Rust. Rust is not "used widely" by any defensible definition. It still seems possible that Rust could , someday, come to be used widely, beyond the HN echo chamber, but on…

> More are employed coding Ada than Rust.

> More code Forth than Rust

Not trying to be a dick, but do you have any evidence you can point to for these claims? I find them to be surprising and unlikely.

Re: #[you_can::turn_off_the_borrow_checker]

#28
post #14

If Rust is not to fizzle like Ada (which got overwhelmingly more investment than Rust has had) it needs a radically faster adoption rate. While several traps imperil Rust's wider adoption -- pathetic compile speed is another: consider JIT in the compiler! -- the borrow checker is an important roadblock for beginners. There is no practical need to enforce borrow checking on all debug builds: it suffices, for beginners…

> If Rust is not to fizzle like Ada [...] it needs a radically faster adoption rate I would challenge this. Adoption rate does not mean longevity. There are many flash-in-the-pan technologies that are here one year and gone a few later. As a concrete example, the adoption rate of Ruby on Rails was nearly vertical in around 2006. PHP was old, boring, adoption was flat if not declining. ROR looked to become become king…

The number of lines of code in use has to be high, but there is a great deal of COBOL code. Who is coding new COBOL, or PHP? Ruby looked promising, but fizzled. Sticking power is necessary, but not sufficient. Rapid increase is necessary, but not sufficient.

To get that miracle, you need both. Sticking at low adoption is the same as fizzling. Peaking but not sticking is fizzling. There are millions of ways to fail, a whole selection laid out for every language to choose from. Most languages pick one, and do. Succeeding takes a lot of good choices, and negligibly few bad ones. Failing to ease adoption where possible is a bad one.

Re: #[you_can::turn_off_the_borrow_checker]

#29
post #28

Earlier quoted context omitted.

> If Rust is not to fizzle like Ada [...] it needs a radically faster adoption rate I would challenge this. Adoption rate does not mean longevity. There are many flash-in-the-pan technologies that are here one year and gone a few later. As a concrete example, the adoption rate of Ruby on Rails was nearly vertical in around 2006. PHP was old, boring, adoption was flat if not declining. ROR looked to become become king…

The number of lines of code in use has to be high, but there is a great deal of COBOL code. Who is coding new COBOL, or PHP? Ruby looked promising, but fizzled. Sticking power is necessary, but not sufficient. Rapid increase is necessary, but not sufficient. To get that miracle, you need both. Sticking at low adoption is the same as fizzling. Peaking but not sticking is fizzling. There are millions of ways to fail, a…

There is definitely new PHP being written, COBOL is finally beginning to decline, but it will probably be around for quite some time still.

I wouldn't worry at all about what the adoption graph looks like. The only thing that matters is whether the language is worth adopting.

Re: #[you_can::turn_off_the_borrow_checker]

#30
post #28

Earlier quoted context omitted.

The number of lines of code in use has to be high, but there is a great deal of COBOL code. Who is coding new COBOL, or PHP? Ruby looked promising, but fizzled. Sticking power is necessary, but not sufficient. Rapid increase is necessary, but not sufficient. To get that miracle, you need both. Sticking at low adoption is the same as fizzling. Peaking but not sticking is fizzling. There are millions of ways to fail, a…

There is definitely new PHP being written, COBOL is finally beginning to decline, but it will probably be around for quite some time still. I wouldn't worry at all about what the adoption graph looks like. The only thing that matters is whether the language is worth adopting.

There have been many, many languages worth adopting. We don't use those because they were not, in the end, adopted enough.
Post reply on HN