Hacker News new | ask | show | jobs
by iExploder 1562 days ago
inexperienced novices and disheartened veterans alike get infatuated with that new shiny thing ...

the rest of just smirk at the pump articles, as we have achieved state of Zen and realize _all_code_is_garbage_ and that nobody, other than minuscule amount of people who ever had a git write access in their life, actually care or will ever care about code let alone a programing language the app was written in

4 comments

There is a reason disheartened veterans gravitate toward a project like Rust. We've seen a lot in our career and much of what we do when it comes to our own tools is automate the detection and elimination of causes of bugs where we can.

It is possible to recognize that "all code is garbage" and "it is a miracle anything works" while also still pushing our industry forward and improving lives for software engineers. A language like Rust is about a particular kind of ergonomic fix. It gives engineers tools to prevent certain kinds of bugs from the beginning if they properly utilize them. It gives you tools that other languages do not have built in so will require more work to use in a disciplined way.

For some people they won't care. They aren't craftsmen they are factory floor assemblers. They glue stuff together and quality isn't the top concern. This is not meant to be a critique. There is a large market for that. IKEA serves an actual need for many people. By all means there is still a place for the Java, Node, Ruby, or Python developer out there. There is more of a market for factory floor assemblers than there are craftsmen.

I personally though still prefer to be in the craftsmen category and for that reason Rust is exciting because it gives me tools that I would formerly have had to reach for OCaml, Haskell, or Lisp to use but makes them more ergonomic without introducing other issues at the some same time. It's a pragmatic application of concepts that we've been exploring since the 70's and finally get to see bearing fruit. Brushing it off as just the "next shiny thing" is doing it a disservice.

The LISP comparison doesn’t ring true to me or even the ‘ergonomic ML’. There is nothing ergonomic about Rust at all compared to managed languages, but if you are willing to fight with the borrow checker you can get managed language safety with C speed. (I wonder though if we’d be better off with a closely integrated assembler and theorem prover if portability was not so important.)
You don't really end up fighting the borrow checker after a while. At that point it approaches the ergonomics of managed languages, and particularly it's ML roots really shine.
I write Python professionally and Rust in my limited spare time, and Wow! do I miss the borrow checker when I go to work in the morning.

And of course: the enums, match, Option/Result, performance and a handful of other great stuff.

Rust has AST level macros, i.e. the real ones that lisp is fond of, albeit with more awkward syntax.
What's wonderful about rust is that by making ownership explicit and enforced, it enables less experienced people to learn those concepts and confidently use new approaches to write performant software without having to shoot off their own foot learning C or other languages where understanding ownership is necessary but not enforced.

More experienced people will generally be happy to offload ownership tracking to the compiler and save some of their brainpower for other things.

> More experienced people will generally be happy to offload ownership tracking to the compiler and save some of their brainpower for other things.

For me, the great benefit here is we can explicitly mark down in the code if a parameter is mutable vs immutable. This is a gain since you know explicitly if what you pass in will be changed or not inside the function.

Rust was a shiny new thing back in like 2018. It gets talked about a lot because it has a lot of ergonomic and conceptual fixes that make life better. People like that. No, not every programming language is the same.

"nobody, other than minuscule amount of people who ever had a git write access in their life, actually care or will ever care"

So nobody, other than nearly every software engineer out there. Nobody, except the majority of people working in our field. Okay...

Pretty much. People are gonna find ways to write atrocious Rust code just like they have with any other language, and no-one is gonna bother to check all the unsafe blocks. Severe bugs may be less prevalent, but life as a a developer will suck just as much. :)
People do consistently audit unsafe usage. And I would rather have atrocious rust code that's memory safe, than atrocious C/C++ code that comes with a free package of CVEs.

There are tools that explicitly exist for this use case, such as cargo-geiger [0]. There was some drama with a large framework called Actix a while ago due to the maintainer having a bit of a cavalier attitude towards unsafe usage. Etc.

0: https://github.com/rust-secure-code/cargo-geiger

History has shown though, that people do check all the unsafe blocks in some projects. I think that was Actix (web?) and probably others. So at least that part of the statement is already contradicted.