HN user

sintheta

18 karma
Posts0
Comments2
View on HN
No posts found.

Programming languages are tools; I would use Go for a web server, typescript for a web site, C++ for a computer game or high performance desktop app... you have not given enough details for anyone to give you a recommendation on what languages might be good to use.

Zig doesn't offer much in terms of high level abstractions and is very manual (I'd consider it far too much pain here unless for the embedded realm) - it's a better C at best, no rival for C++'s power and software design capabilities...

Rust has serious pain points when you consider the borrow checker and want to do complex stuff asynchronously, there's a big learning curve here, also not in every realm is it crucial to have memory safety (a desktop computer game is not flight control software... which btw you could also use C++ for, and it is used here, albeit w/ care). On a one man project it's also much simpler to simply write good modern C++ code than it would be on a large scale project w/ hundreds of programmers. I've also read that Rust's build system (nice as it is) has still limitations w/ very complex build setups...

And whether it's good to use C++ in 2024 for a new project... C++ will be around for DECADES at this point, it has a swath of libraries and tooling, good compilers producing optimized output targeting everything under the sun... yep, it's not part of the "hype around town" languages on Reddit or other boards, but C++ is used every single day in almost every industry down the line by millions of programmers!

What exactly is your worry? That you can't compile your code from 2024 in 3 years? Relax about the online hype... there are areas where EOL languages are still used... C++ isn't dead yet, won't be for a long time. It won't pick up steam any time soon it seems, but for what it can do (including its tooling and libraries) it's hard to beat, and it's not obvious to me that Rust and Zig are obvious "successors".

Zig isn't even at a 1.0 version yet w/ no clear roadmap to get there... I'd be much more worried using it for a serious project than C++... and C++ knowledge will be better on your CV than "Zig knowledge" (which most people won't even have heard of).

Can't comment on the comparison to Rust, but I recently spent quite some time learning OCaml, working through the excellent and freely available cs3110 course https://cs3110.github.io/textbook/cover.html ; I really really wanted to like the language... I agree w/ the submitted article about the heavy reliance on linked lists and recursion, but what disillusioned me from it is that after many weeks of study I discovered competitive programming and on a whim started doing some easy problems.

Since I was spending most of my time w/ OCaml at that point I thought it could also be a way to practice it further. So for a particularly easy problem it would go something like this: A straight forward, easy to read, performant C++ solution took me 10 minutes; an ugly unidiomatic OCaml version took me 30 minutes; and a beautiful idiomatic OCaml version using recursion that still no non-OCaml programmer could ever read took me something like an hour...

It really dawned on me that after weeks of studying OCaml I barely knew how to write anything particularly useful in it from scratch. Dealing with user input/output still seemed cumbersome, given everything's immutability... from an intellectual perspective it feels interesting, and I had fun with it, but for now I decided I couldn't see myself becoming productive enough in it to justify further sinking time into it. There's so much to still learn for me (doing a network related project at the moment learning a ton about networking, sockets, etc), that trying to become an unproductive OCaml programmer probably shouldn't be high up my list of priorities... and that is not to say people aren't productive in it, that's to say that I don't see myself becoming productive in it any time soon, compared to being productive in C++ while being far away from being any expert in it.

Maybe I'm too stupid for it, am not suited for it, need a few years of further programming to appreciate some things about it... but for now, sadly, I feel like I've wasted significant time I should have better spent on studying other topics and actually working on projects. And addendum: Never comment on downvotes, I know, but how I immediately got one for this comment... surprising.