←back to thread

611 points LorenDB | 3 comments | | HN request time: 0s | source
Show context
thrwyexecbrain ◴[] No.43909187[source]
The C++ code I write these days is actually pretty similar to Rust: everything is explicit, lots of strong types, very simple and clear lifetimes (arenas, pools), non-owning handles instead of pointers. The only difference in practice is that the build systems are different and that the Rust compiler is more helpful (both in catching bugs and reporting errors). Neither a huge deal if you have a proper build and testing setup and when everybody on your team is pretty experienced.

By the way, using "atoi" in a code snippet in 2025 and complaining that it is "not ideal" is, well, not ideal.

replies(5): >>43909244 #>>43909532 #>>43910069 #>>43910728 #>>43913902 #
yodsanklai ◴[] No.43909244[source]
> The C++ code I write these days

Meaning you're in a context where you have control on the C++ code you get to write. In my company, lots of people get to update code without strict guidelines. As a result, the code is going to be complex. I'd rather have a simpler and more restrictive language and I'll always favor Rust projects to C++ ones.

replies(1): >>43909887 #
bluGill ◴[] No.43909887[source]
That is easy to say today, but I guarantee in 30 year Rust will have rough edges too. People always want some new feature and eventually one comes in that cannot be accommodated nicely.

Of course it will probably not be as bad as C++, but still it will be complex and people will be looking for a simpler language.

replies(2): >>43910391 #>>43913317 #
1. timbit42 ◴[] No.43910391[source]
How many rough edges will C++ have in another 30 years?
replies(1): >>43914716 #
2. bluGill ◴[] No.43914716[source]
Who knows. It will likely have more than any other language. Though it will also continue to not get credit for things it got right.

There will always remain two types of languages: those that nobody uses and those that everybody complains about.

replies(1): >>43925390 #
3. leftyspook ◴[] No.43925390[source]
Could it be that it gets no credit for things it got right because it got barely anything right?