C++ is a language you should give serious consideration to learning in 2019 (or whenever you happen to come across this article). Rapid language modernization, better tooling, a growing and inclusive community, and a thriving job market are just some of the reasons C++ should be your next language to learn.
Wow, this guy drank too much Kool-Aid ™️️, I'm out.
Yeah, I get it. At least in the communities I've been a part of over the years, C++ has a consistently bad reputation.
...
Modern C++ (versions ≥ 11) is an entirely different beast and should be considered separately.
foreach new_shiny in hackerland
{ import; improve; integrate; }
Plus, importing crusty old code into your projects is fun, well, at least more fun than dissecting them and re-coding in a new language which lacks the libraries they leaned on.
(Score: 2) by Immerman on Tuesday October 29 2019, @12:48AM (1 child)
Actually, no, that's just the commonly used aspect. It's not *nearly* as widely used, but C++ template metaprogramming is a huge field in itself, aided in large part by the fact that you can cause templates to resolve on values as well. Only integers is I recall correctly - but it's C++, anything is an integer if you want it to be. Sqrt(constant) resolved at compile-time? Child's play - practically a meta-programming "hello world".
Even just using types, if you're clever enough and the problem is amenable, you can resolve a huge amount of processing at compile-time so that only a comparatively tiny amount of data processing specific to run-time variables needs to be done at runtime. And you can pack away a surprising amount of the information you'd assume was variable into outstandingly complex auto-generated templated types.
I was just beginning to scratch the surface when I drifted away from programming heavily - and my overall impression was that it was an *incredibly* powerful tool that vanishingly few people would ever directly use. I seem to recall some really interesting implementation details in the Boost libraries. They managed to just about add new language features by invoking some of the more esoteric meta-programming abilities.
(Score: 0) by Anonymous Coward on Tuesday October 29 2019, @01:38AM
Metaprogramming in QuakeC offers greater rewards.