Rediscovering C++
I've been looking into different programming languages, because I want to learn a new one. Among them: Odin, OCaml, Roc, and Rust. I even considered Haskell. More than once.
These languages have many things in common. They compile to machine code and support functional programming to some degree. Most of them, at least. Those are characteristics I want from a language. But none of said languages satisfied me. They couldn't keep me interested.[1] As such, I gave up searching.
I thought to myself that new and exciting is not what I want. What if I want old and boring? That made me look up C, where it's at, and what the newest standard adds to the language. And, while I'm at it, why not check out the newest C++ standards as well? So I did.
I was wrong. New and exciting is exactly what I want, but mixed with established and battle tested. And that's what C++ can provide.
I like the simplicity of Odin. I like not having to manage memory in Rust without garbage collection. I prefer an Optional to null and a Result to an exception. And C++ offers all that and much more.
The only problem is that I can't stand header files. But even that is - more or less - a solved problem, because C++ finally has modules. While not as mature as one wants them to be, they're usable.
Sure, there's no official build system. Yes, there's also no official package manager. Yada yada. I learned to program, and fell in love with it, without these things. Why should that stop me now? And from what I can tell - with my lack of knowledge - xmake does a good enough job solving those problems. For me at least.
The standard library contains everything I need and want, improving with each standard. I can use the things I like the way I like to. I can create my own little version of C++. And I enjoy it a lot.
-
Roc looks promising, but is not mature enough to be worth the hassle right now. ↩