Discover your dream Career
For Recruiters

"As a coding language, C++ appeals to the ego, not the intellect"

I notice that this site has a tendency to extol the virtues of C++ as a programming language. As someone who has worked with C++ and who has followed the debate around its use for a long time, I think it's time to set the record straight.

The truth is that C++ is one of the worst languages ever foisted on the industry. Far from being used in modern trading systems, C++ should now only be used for legacy projects. It is based around machine thinking, which is not programming thinking.

Generations of programmers have been misled by C and C++. Many have fallen into the black hole of its cult with trite platitudes like ‘under the hood programming’, which means no more than driving along with the hood open, trying to fix the engine, but unable to see the road. Cult followers urge end-users to "trust the programmer", which is stupid and naive, but appeals to the programmer's ego. And programmers are supposed to have "freedom," although no one ever says freedom from what.-  It's certainly not freedom from the flaws and traps of C++.

 

Programming is about programming and not about hardware machines (programs run on theoretical machines). That seems hard to understand and counter to people’s intuition. C++ just supports the intuitive and populist thinking instead of trying to fix it.

So not only is C++ technically bad, but it is culturally bad since it appeals to the ego, rather than the intellect.

I'm not the only one to dislike C++. Ken Thompson, the Bell Labs researcher who implemented the original Unix operating system, described it as a "bad language" that's "way too big, way too complex" and "obviously built by a committee." Damningly, Thompson also said that C++ does, "a lot of things half well" but is "just a garbage heap of ideas that are mutually exclusive."

The problem is that C++ is based on C and C itself is not a brilliant language. It is full of flaws and compromises. It compromised on compiler technology, forever forcing programmers to take care of detail that should easily be done by a compiler. In turn, C was based on B, which was based on Martin Richards’ BCPL, which itself was a cut down on Christopher Strachey’s CPL, which was too ambitions to be implemented at the time. It is Strachey who is the real genius here in my opinion, not people like Bjarne Stroustrup, who now works for Morgan Stanley and who hacked OO into C to create C++, even though C wasn't a good base. 

Either way, if you're trying to learn C++ and you're struggling to master it, it's not you that's the problem. The language is flawed. Designing a programming language is very difficult, and C++ is simply not that well-designed. Systems programming and application programming are two very separate things, and C++'s real issue is that it tries to combine them both. 

Ian Joyner has done many things, including industry programming, systems programming, language and programming research and compiler development, networking, distributed system standards and lecturing. 

Register your CV with eFinancialCareers to make yourself discoverable for C++ jobs in finance. 

Contact: sbutcher@efinancialcareers.com in the first instance. Whatsapp/Signal/Telegram also available (Telegram: @SarahButcher)

Bear with us if you leave a comment at the bottom of this article: all our comments are moderated by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)

Photo by Peter Gombos on Unsplash

author-card-avatar
AUTHORIan Joyner Insider Comment
  • PN
    PNMnasa
    11 hours ago

    Any high-level language has too many controlling ide. Not only does it take time to compile, but it's also prone to errors. A C/C++ programmer will never get the error that an object is a copy of another object. obj1 = obj2. If you're not careful, it's easy to misunderstand that obj1 only copies attributes. whereas in C/C++ you just need & and it's all taken care of. Should I use my knowledge to type & or spend an hour figuring out how to just copy the attribute. I know objects shouldn't be created a lot because it affects performance. But wait a moment, the article discussed that performance is not very important. ok, in short, any language has ways to increase its own performance. The fact that C is faster than python is because python is a lang script. It's very slow, but debugging in python is quite easy even for new programmers. C/C++ is a good start if you want to create a programming language. If you still can't accept it I think you should use java or rust. I do not encourage you to use scripts. script is used for simple things and without support from C/C++, java, rust, C#,... its speed will make you uncomfortable. But I have one. Note that scripting languages like js are much better than python because it has the ability to start multiple threads automatically. Although I say that you should not depend on the ide. But in this case it is a must. python is probably the worst scripting language, perhaps its creator still doesn't know how complicated today's software is. Maybe 10 or 20 years later. Microsoft upgrades the libs in sys and only few programmers will be able to understand it. We are programmers. But I want to create frameworks and engines. What I need to do is optimize speed. What you need is simplicity. My country is very poor and I don't want people using my software to have to use a phone or PC >1000$ (3 months average salary).

  • Go
    Gomez
    9 August 2023

    I agree with you Ian! C++ gurus often praise some template magic, that is not really applicable outside of a few use cases like open-source libraries. This makes many less-experienced developers think that is how badass coding is done, resulting in overcomplicated and slow-to-build code.


    Besides that, C++>=17 corrects many problems, however, it still supports C++<17. Good luck in trying to explain macros in less than 5 minutes to someone new to the language and why he/she should avoid using it. Or why we have .hpp and .cpp files, or how to link with another library.


    The tooling is also a big issue. Vanilla Visual Studio aged very badly, and refactor tools don't work well (because the language is hard to parse). The build systems are unbearable to use, just compare Rust's Cargo with CMake.


    My advice to anyone considering C++ for performance or compatibility reasons: make a C-only API over a small C++ part that gets the job done, and then write the rest in any other language: Go, Rust, C#, Swift, Java, ... (it is easier to write a binding over pure C API).

  • Si
    Sinisa
    26 July 2023

    I dislike C++ because it was based on the wrong premises.


    Also, you have to be lousy programmer to have problems with C, for example.


    C17 and C23 are great standard that are making C a fantastic programming language. Here is more info ...... The ancient C, that is discussed above, is a far cry from the Modern C. Especially C23 that is coming later during this year and will be supported by most common compilers.


    C++ is a lousy programming language, just read the relevant e-mail from Linus Torvalds. He is so correct. He wrote few sentences on why is it lousy, which are sufficient for any smart individual.

    Hence, why is it so lousy ???

    Object Oriented Programming (OOP), as a concept, is a colossal mistake, which costed 20 years and billions of $. Why ???? Because it is based on the category theory (nicely described here: Category theory - Wikipedia

    ), which is a system of logic, which is incomplete and / or self-contradictory. This was proven by Kurt Gedel in his theorem of integrity and completeness, back in 1930s. This theorem is sometimes (wrongly) called Incompleteness theorem.

    What are the consequences of this for the OOP ??? Main consequence is that when you develop the language to its end, your reach an absurd, which is exactly what happened with C++. Then you apply a bunch of the new cures, which only create new absurds. This development is due to the fact that C++ authors either did not learn mathematical logic or they just wanted a Ph.D. with a bunch of scientific papers, regardless of the nonsense that they created.

    C17 and C23 (which are the latest standards for the C Programming Language) are the examples of how a proper programming language should be developed and standardised. They are adding features which simplify and not complicate the logic and the language.


  • ga
    gamerguy45654
    12 April 2023

    The parts where you said "It is based around machine thinking, which is not programming thinking. " and "Programming is about programming and not about hardware machines (programs run on theoretical machines)." have me a bit worried about your logic. Not going to lie.


    I don't want to sound rude, but if you think like this, then you are an idiot. Let me correct you on this matter, PROGRAMMING IS ALL ABOUT MACHINES. In fact, everything we ever do in programming is built to run on a machine. Write code in another language that you 'prefer' and they will run on a machine. Even Java, which runs on a virtual machine, can be broken down to the machine level, because the virtual machine itself has to run on your native machine.


    Also, the part where you said that programs run on theoretical machines. Where in the living hell are you getting that from? It's probably that you've only learned one language, and that's Java (my guess is that's why you would ever think that, because with Java that is literally the case) and you refuse to learn any other language like C and C++ because to you, they spread what you perceive as 'dillusions' (your the only dillusional person here from what I can tell) about machines. Honestly, I cannot put two and two together with what you said there, because your logic in that matter makes zero sense. If programs never ran on machines, then what in the living hell are machines? Are they just random objects just sitting on our desk that don't do anything, while our programs are being run from the air around our monitors. Can you see the problem that I am getting at here?


    Look, if you don't like C++, then that is totally fine. Yes, it is a hard language to learn and use, but this whole review has been pretty unfair to C++. Seriously, it's like saying "My toaster gives the dillusion that it produces toast, when in reality it produces Pancakes".


    Seriously, this has got to be the worst C++ review I have ever seen on the web. I may be one who is biased towards C++ so I am sorry about that, but even if I wasn't, I still would think the same exact way about this article, because of the outrageous things you brought to the table here.

  • up
    up2isomorphism
    2 February 2023

    This guys is so funny, first he wants to use C creator's words to attack C++ (which actually I agree if you compare C to C++), a couple of sentence away he started to attack C.


    I just hope nobody works with this guy, it can not be a good experience.

Sign up to Morning Coffee!

Coffee mug

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.

Boost your career

Find thousands of job opportunities by signing up to eFinancialCareers today.
Recommended Articles
Recommended Jobs
Paritas Recruitment - Data & Tech
Quantitative Researcher (Systematic Fund)
Paritas Recruitment - Data & Tech
London, United Kingdom
Agile Talent
Interim Quantitative Modeler
Agile Talent
London, United Kingdom
Edgworth Partners
Private Equity Associate - Direct Lending Fund
Edgworth Partners
London, United Kingdom
Squarepoint Capital
Software Developer – Post-Trade Automation
Squarepoint Capital
London, United Kingdom
Edgworth Partners
Private Equity Analyst (Tech and Healthcare Focus)
Edgworth Partners
London, United Kingdom

Sign up to Morning Coffee!

Coffee mug

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.