• 2 Posts
  • 41 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle







  • Just because it’s not possible on a Turing Machine doesn’t mean it’s impossible on a PC with finite memory. You just have to track all the memory that is available to the algorithm and once you detect a state you’ve seen already, you know it’s not halting ever. The detection algorithm will need an insane amount of memory though.

    Edit: think about the amount of memory that would need. It’s crazy but theoretically possible. In real world use cases only if the algorithm you’re watching has access to a tiny amount of memory.




  • It’s the amount of legacy it’s carrying on that drives me crazy. Many of the implicit default implementations are confusing. That’s where all these “rule of 3”, “rule of 7”, “rule of whatever” come from. The way arguments are passed into functions is another issue. From the call-side you (sometimes) cannot tell if you’ll end up with a moved value or a dangling reference. The compiler will not stop you from using it. Even if the compiler has something to tell you, it’ll do it on the most cryptic way possible. I’m grateful we have C++, it paid lots of my bills. But it’s also a pain in the ass.











  • tl;dr Language evolution and future outlook are big factors besides the existing language features themselves.

    I guess Rust has attracted many C++ devs because C++ is painful and there were no other/better options. Rust comes with a build/dependency management system and memory safety guarantees on top of the type safety. Even though C++ templates are still unmatched, I prefer Rust 95% of the time. C++ is evolving very slow and it’s extremely hard to participate. Rust will win that race eventually.

    Python has been around since 1991(!) and it took a looong time to build the community. It was a niche like Nim is now for many years.

    I’ll definitely keep an eye on Nim because it has the potential to become quite popular.

    Again, that’s all just my opinion.