Hacker News new | ask | show | jobs
by UI_at_80x24 119 days ago
I've been a fan of all rust-based utilities that I've used. I am worried that 20+ (??) years of bug fixes and edge-case improvements can't be accounted for by simply using a newer/better code-base.

A lot of bug fixes/exploits are _CAUSED_ by the C+ core, but still... Tried & true vs new hotness?

4 comments

Don't hate me for this, but... is 20 years of Rust really new?

https://en.wikipedia.org/wiki/Rust_(programming_language)

I do get what you mean, but Rust has been baking for a decade, finally took off after 10 years of baking, and now that is been repeatedly tried and tested it is eating the world, as some developers suggested it could eventually do so. I however do think this shows a different problem:

If nobody writes unit tests, how do you write them when you port over projects to ensure your new language doesn't introduce regressions. All rewrites should be preceded by strong useful unit tests.

Ideally, but if a project wasn't written with tests at the time then finding a working time machine can be a challenge. If you try to add them later you won't capture all the nuance that went into the original program. After all, if the implementation code was expressive enough to capture that nuance, you'd already have your test suite, so to speak. Tests are written to fill in the details that the rest of the code isn't able to express.
Tests are written for various goals: integration testing, to prevent regressions, and in the same effort to prevent regressions to protect mission critical / business logic code. If all those nuances are captured by good tests, you arguably have "100%" test coverage, you don't need to test every single line of code ever written to have 100% test coverage in my eyes. But then when you go to translate your project to a new language, you port the tests first, then test against those tests.

This is my personal belief on this anyway.

he has no answer for this
But the 90s was only 20-years ago!

lol, you got me. Stupid old brain not calculating time correctly.

I was born in 1990 so I get it! I still say 21 when people ask me how old I am... Aka how old do I need to say I am to be able to drink alcohol LOL I don't drink that often mind you. I just don't really think about my age a whole lot...
> years of bug fixes and edge-case improvements can't be accounted for by simply using a newer/better code-base.

Partially is in fact true: Just because the Rust use a better type system (after ML) + better resource model (aka borrow checker), and if you are decently good, you eliminate, forever!, tons of problems.

It can't solve things that arise by complex interactions or just lack of port subtle details like in parsing poor inputs (like html) but is true that changing the language in fact solve tons of things.

> but is true that changing the language in fact solve tons of things.

*so long as you dont use unsafe rust

**unsafe rust required for systems programming

***rust is a systems language

****does changing a default actually solve anything?

Is Rust still considered "new hotness"? I feel like the industry has long-since moved past that perceived "blocker".

It seems like Rust is now just the default in all manner of critical systems.

Rust - no. sudo-rs not hotness, but relatively new.
No, it's Node.js. I kid you not. I keep coming across Node in places where I really would not expect it.
apart from safety critical systems.... whats that all about? youd think with all the safety guarantees itd be good for something like that
I think it's worth trying!
It absolutely is worth trying. I look forward to it being battle tested and proven. I just don't want to be the one doing the testing.

rg, fzf, and several others that I can't think have proven to me that rust is the direction going forward.

Rg/grep is kind of like make/ninja imo.

It’s not so much about the language as it is about the hindsight/developer/project