C++ is everywhere, but no one talks about it
sh.reddit.com
sh.reddit.com
If I ever wanted to learn a new language, C++ would be it.
[0] The theory I had was that almost none of the software I use is written in Haskell. Which was true by a long shot.
Moreover every major C compiler (GCC/Clang/MSVC/etc) is written in C++. So any C projects depending on those compilers is indirectly depending on C++, e.g. Linux. Not to mention the success of LLVM among other languages.
I don't think we're staying there, either. C++ is very long in the tooth. Most people looking for a C++-like thing now gravitate towards Rust(with a little bit of deviation for stuff in roughly the same ballpark like Nim, D, and sometimes Zig). And many of the old projects are looking towards migrating to new languages as well. It's just a matter of the critical masses shifting.
You'll never see the myriad of hidden Java services or tools that are internal to 'BigNameCorp Inc.'
You won't hear of the tiny bespoke C# apps that some little dotcom uses to manage some of its processes.
You'll never touch the layers of Python glue holding that Fintech startup together.
Software you see, you know, is either native apps for consumers or Web frontends. Of course C++ and JS dominate.
But there's so much more hidden away, a whole world just tucked under a job interview so most don't see it. In this place, Java may very well be King, but Python, C# Go, and yes, C++ all have their parts to play.
Even if its role would be restricted to language runtimes, drivers, GCC, LLVM, game console SDKs, and GPGPU programming, that is enough to keep the language around for a couple of decades more.
We don't need to use the same language for everything.
True; but it is very convenient and productive to use one single language for everything, particularly when it has "multi-paradigm" support. I find there is less cognitive load which allows one to better focus on the domain problem-solving.
Hence why there are a couple of domains where C++ used to dominate 20 years ago, and eventually were taken over by other languages, most notorious one, GUI frameworks.
It turns out lack of reflection and automated memory management doesn't lead to productive workflows, and tooling.
Yet they keep forgetting it equally relates to all mainstream languages older than 20 years in production.
I bet no one would manage a pub quiz regarding any of them, if the questions were honestly based on the language complete history, thus not fully understanding them either.
Having a “small language like C” doesn’t do anything besides move the complexity to application code and hide those details from the compiler. In fact, with sophisticated optimizing compilers and linkers, it’s impossible to predict what any random snippet of code in a large project is transformed into, assuming it exists at all in the final binary.
Not quite; if you subscribe to the "other form" of the quote viz. “A Jack of all trades is a master of none, but oftentimes better than a master of one” ;-)
In the case of C++, the language is large and open-ended enough that you can truly express a lot more different models of computation, at different levels of abstraction thus giving you a larger design and implementation space. I think this is the main reason for the success of the language.
The first one is old Reddit, the 2nd is React? / JS FrontEnd based rendering. The 3rd ( "sh" ) if I remember correctly is based on something similar to Livewire / HTMX concept.
I am not even sure if it was accidentally exposed to the public.
But well. The real sin of new.reddit wasn’t really the technical underpinnings, but the UI design. Here it seems even worse in parts: permanently clicking just to read the comments.
I don't know who designed this, but it is truly awful.
Fixed that for you.
I tell everybody who cares to listen to learn C & C++. They are the common "glue languages" which underpin everything with a huge established ecosystem and gives you the ability to program anything and everything.
Contrary to what HN threads might lead you to believe, they are not that hard to learn and do not need you to become an "expert" in all aspects (i.e. dark corners) of the language. You will pick up the tricks/expertise when you need them.
These languages will outlive the HN audience, regardless how we view them.
Even if you are writing in a completely different language, at some point native software will have to run, maybe you need a compiler or an interpreter, but chances are C++ will be involved with that.
So lots of power to run most programming languages.
The biggest problem is cultural.
Secondly,
"CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
https://www.youtube.com/watch?v=zBkNBP00wJE
"C++20 For The Commodore 64"