Hacker News new | ask | show | jobs
by swalladge 2255 days ago
> Wouldn't everyone be better off if that language was Rust itself, and people who don't want to write that "modern code" ... don't?

Agreed. The author's whole argument of not wanting "having to make these superficial changes again and again" doesn't make sense. There isn't any requirement for all code to follow the latest and greatest idioms. Rust guarantees backwards compatibility, and the author even acknowledges that in the article.

It would be pretty sad if the reason for no new features or syntax in Rust was due to programmers not wanting to feel like their code was no longer idiomatic.

2 comments

I think it depends on whether you are working full time in Rust or as a hobbyist trying to break in.

I gave up on EmberJS around the same time because I only got a five hour chunk of time every couple of weeks and they were making semantic changes so frequently then that it felt like I spent half of my time upgrading my code to work with the changes. It ended up being a major factor in killing that project for me and I’m just now getting back to it.

Low-investment hobbyist Rust projects don't need to be idiomatic. Rust hasn't broken backwards compatibility except for a few soundness fixes that broke hardly anyone. It sounds like your EmberJS experience was pretty different.
Wow, he said he got stuck with Rust 2015 and I thought Rust wasn’t keeping backwards compatibility, like earlier Swift. Not cool.
I've been using Rust since 2015 and never had to update anything.

The Rust "language version" is a per translation unit setting, and Rust supports having multiple library versions in a binary.

So when I want to use a new language feature, or want to use a new library or library updated to use a new language feature, I just do so in the next translation unit I create. Creating a new translation unit always defaults it to the latest language version (unless you specify otherwise), so this is a quite laidback low-friction approach. I tend to create at least one translation unit per month.

If I had to update all my code to use the latest language features I wouldn't be doing anything else full time. This has nothing to do with Rust. I also use C++, Javascript, ... I don't think I would manage.