The 2024 Wheel Reinvention Jam is in 16 days. September 23-29, 2024. More info

Suggestions for possible languages to switch to (from c++)

So I I'm currently using C++ for some side projects I'm doing and the more I use this language the more I despise it. I know there are better languages out there but I also know a lot of them are non-starters for low level programming (mainly due to garbage collecting or other restrictions on memory management). I was wondering if any had an experience with or opinions on D or Nim (both of which have optional GC's as far as I understand)? Those are the languages at least I think have the best chance, from my cursory readings, of fulfilling my needs. I know there is also Odin which obviously has good goals as a language but of course is still very early in development. Though I might not be opposed to using it and just working on developing it myself since it would be interesting to me.

Edited by Jason on Reason: Initial post
Last I checked (half a decade ago) D was essentially unusable with GC disabled. Most of the standard library and a few core features depend on the GC to manage memory.

The straightforward answer is a C-like subset of C++. Consciously don't use the esoteric features of C++ that you find to be an obstacle to your productivity.
To back up what ratchetfreak said, here's a presentation about someone who chose a subset of C++:
https://www.slideshare.net/Richar...restrictions-for-game-programming
It's more oriented for team projects (so I guess some of it doesn't apply for your side projects), and for game projects, but it explains the thought process to choose which features to exclude.

I had a tiny experience with Rust, and it's a language I would consider for some projects, if there wasn't its build system (cargo) that... shouldn't exist at all? And in the end, I guess we should also use only a subset of it ^^'
If this is just for side projects then Odin is more than usable. People are currently using it for games, compilers, fluid-sims, all manner of things. Definitely give it a try if you haven't, I think you'll enjoy it :)
I like simple tools. C-99 is one of them. C is as simple as possible without sacrificing control of your computer and it runs the fastest outside of assembly.

C++ is horribly complex. Invented by a dude that never made anything else. C was made by a programmer that built things that changed the world.

Compare their resumes:
https://en.wikipedia.org/wiki/Dennis_Ritchie
https://en.wikipedia.org/wiki/Bjarne_Stroustrup

The only other language I am curious about is Jai, but its not out yet. :(

Edited by Mór on
Thanks everyone for the suggestions.

"If this is just for side projects then Odin is more than usable. People are currently using it for games, compilers, fluid-sims, all manner of things. Definitely give it a try if you haven't, I think you'll enjoy it :)"

Ya, if I find I have the drive I might check it out. Would be a good learning experience since I'm sure I would have to look into the language source at some point.

"The only other language I am curious about is Jai, but its not out yet. :( "

Ya man, I've been stalking his twitter account everyday for updates on this language. I'm so ready for it. Hope it works out
Seconding Odin. Bill's discord is quite active and there's always people willing to help. I've been using it and so far I'm having a really good time.
boagz57


"The only other language I am curious about is Jai, but its not out yet. :( "

Ya man, I've been stalking his twitter account everyday for updates on this language. I'm so ready for it. Hope it works out


You mean.. I'm not the only one? :'-)
Late reply I know, but have you considered looking at Rust?

https://www.rust-lang.org/
This: https://www.beeflang.org/
The discord server recently just exploded with interest, mostly thanks to this video:
https://www.youtube.com/watch?v=L6w4y6_ENdU
This: https://www.beeflang.org/
The discord server recently just exploded with interest, mostly thanks to this video:
https://www.youtube.com/watch?v=L6w4y6_ENdU
Ha, what a language name.