C++ will be used for the next 50-100 years in financial services

If you're toying with the idea of learning C++ for a job in financial services, drawn by the promise of huge pay but put off by the awareness that it's really not an easy language to earn - particularly compared to Python, Rainer Grimm has a message for you: do it. C++ is deeply embedded in the financial services industry, and that's not going to change anytime soon.

"When I first started studying mathematics in 1994, my professor said to me that it wasn't worth learning FORTRAN," says Grimm. "He said FORTRAN wouldn't be used much in the future, but there's still plenty of FORTRAN around now. He said much the same about C++, but when a programming language is used as much as C++ is, it will be used for the next 50-100 years."

In banking and elsewhere, C++ is used for low latency coding applications. "The best jobs for C++ coders are in high frequency trading," says Grimm. The language is also used by games developers and automotive manufacturers. "C++ is used where you need to talk directly to hardware, in an abstract way," he adds. "There's no real alternative to it."

Grimm might be biased, but he's also in a good position to judge the programming landscape. Based in Germany, Grimm is one of the top C++ trainers in the world. Before the pandemic, he travelled globally. These days, he mostly tutors groups online. He's popular: "I'm booked up for 2022," Grimm confesses.

Should you learn C++ on your own?​

There's a reason C++ tutors like Grimm are needed. "You can learn C++ on your own, but your journey will be way, way longer [on your own than if you have a tutor]," Grimm says. "C++ is a complex language, you need to learn how to do it right instead of falling into traps."

What are the traps? Grimm says it's all about avoiding the "old techniques." - "C++ is a 40-year-old language – it was developed with hardware in mind that is now 40 years old," he says. "The language has improved a lot in the past 20 years."

The main problem with self-taught C++, or even C++ taught at universities, is that people tend to start on old versions of the language, says Grimm. At universities, this is largely because professors themselves cut their teeth on C++ '98 and think students need to start there too, but the older versions of the language require manual memory allocation which is unnecessary in the most recent iterations.

If you're learning C++, you should start on a version no older than C++ 11, says Grimm. From there you can move onto C++14 or C++20 (the most recent version). "It's very important that you start with modern C++, not with legacy C++ and that you learn by design," says Grimm. "When you're really, really, good on modern C++ you can start to think about how it was done before. But you don't start on the complex levels of abstraction. It's like when you're learning to drive a car - you need to learn how to use a brake, not how the brake works."

C++ or Python?​

Python is an easier language to learn than C++, and for this reason it tends to be the go-to language for junior coders. But Python will only get you so far, says Grimm. "Python is a good first step, but when you want to go deep into programming, you need to learn C++," he says. "Someone has to implement the infrastructure. Python is often only a wrapper around the C++ code."

C++ or Rust?​

There's also Rust, which is the up-and-coming low latency language and is particularly popular in the crypto space. Grimm is admiring of Rust. As a recent language, it avoids many of the pitfalls of C++ which he says was "designed with a mindset which no longer fits." This includes concurrency, polymorphism and memory management. "When they designed Rust, they did it right by design," says Grimm. "In C++ we have to improve the functionality with updates that extend the language."

Despite Rust's inherent advantages, Grimm says there's little chance it will replace C++ in the short term. It's simply too new. "Rust is not mature enough and cannot be certified," he says. One day, it might be a rival, but for the moment, he says learning C++ remains by far your best bet.
c-future.jpeg


By Sarah Butcher
 
Last edited:
yes, because everything will be transacted in rubles?

Probably more bilateral trading -- I give you oil or wheat and you give me something you manufacture. The USA and Britain are in a poor condition for this as, for example, the USA has been running current account deficits for at least the last quarter century and there's perhaps not so much appetite for dollars abroad (again more than one reason: not much outside agri that you can buy with dollars and T-bill interest rate is well below the official inflation rate). Both countries have hollowed-out manufacturing sectors. This didn't occur overnight, but up to now the US has used its military power to intimidate anyone who thought of going outside the dollar-centric system. Until Russia came along and said, "Okay, big boy, let's see what you've got."

I classify countries (outside the utterly third world ones like Pakistan, Sri Lanka, and chunks of Africa) in three categories:

1) Commodity-rich countries like Russia, where the ruble is undergirded by oil, gas, and wheat
2) Manufacturing countries like Germany, China, Korea, and Japan, that can trade their value-added manufacture for commodities, and
3) Dead-beat empires and ex-empires like the US and UK, which have little other than fiat currencies of doubtful value to offer for both commodities and manufactures.

At the moment, the dollar is still undergirded by Middle East oil -- the 'petrodollar" -- which goes back to the early '70s, when Nixon and Kissinger made a deal with the Middle East ("accept payment for oil in dollars or else"), but it's unclear how long this is going to last, with both Saudi and UAR refusing to take calls from Biden, and Saudi probably making a deal with China to accept yuan as payment.

Anyway, coming back to the main point, the future of finance in the USA (and the UK, for that matter) looks very iffy to me.

On a side note, it looks like a record number of Americans are applying for a second passport, usually some sort of investment scheme as offered by, for example, Portugal.
 

Daniel Duffy

C++ author, trainer
C++ ranks higher than Java in the Tiobe language popularity index for the first time ever, dating back to 2001. Java slipped to a new low in the latest edition of the index.

The December 2002 Tiobe Programming Community Index has C++, ranked third, surpassing Java, ranked fourth. It is the first time in the history of the index that Java has not ranked in the index’s top three languages.

“Performance is still very important nowadays and C++ is the fastest large system programming language out there,” said Paul Jansen, CEO at software quality services provider Tiobe. But all is not dire for Java, he stressed. “Java has nothing to worry about so far. I am saying this because it also grew in popularity in 2022 (plus-1.70%), but not as much as the top three languages.”


 

Daniel Duffy

C++ author, trainer
An example of 21st century Design Patterns.

C++:
// Strategy.cpp
//
// 21st century design patterns based on C++ Concepts.
//
// Examppe 1: An example of the well-known Strategy design pattern. It is an algorithm.
//
// The test cases are:
//    1. Defining standardised interfaces/protocols (provides/requires) using Concepts.
//  2. 3 versions:
//         . composition (as a member of a class).
//           . argument to a template member function.
//         . argument to a global member function.
//
// Advantages:
//    A. compile-time (no subtype polymorphism (virtual functions), pointers).
//  B. Uncoupled components, no direct dependencies (e.f. Visitor pattern)
//  C. Reusable and standardised protocols.
//  D. Universal replacement for traditional "single paradigm" GOF (Gamma) patterns.
//
// See forthcoming book Datasim Press 2023
//
// Modern Multiparadigm Software Architectures and Design Patterns
// With Examples and Applications in C++, C# and Python
// (Daniel J. Duffy and Harold Kasperink)
//
/*
    Ben, I want to say one word to you. Just one word.
    Yes, sir.
    Are you listening?
    Yes, I am.
    Concepts.
    Exactly how do you mean?
    There's a great future in C++20 Concepts. Think about it. Will you think about it?
*/
//
// (C) Datasim Education BV 2023


#include <iostream>
#include <cmath>
#include <string>
#include <type_traits>


template <typename T>
    concept FloatType = std::is_floating_point<T>::value;

template <typename T>
    concept IntegralType = std::is_integral<T>::value;

// Could be used as a constraint on the numeric type
template <typename T>
    concept DataType = FloatType<T> || IntegralType<T>;


// Protocols for Strategy
// V1 coupling with a class
template <typename Algo, typename P>
concept IDistanceStrategy = requires (Algo algo, P p1, P p2)
{
    algo.distance(p1, p2);
};

// V2 less coupling ==> more flexibility in client code
template <typename Algo, typename C>
    concept IDistanceStrategy2 = requires (Algo algo, C x1, C x2, C y1, C y2)
{
        algo.distance(x1, x2, y1, y2);
};

// For convenience
using value_type = double;


// Stateless strategy ... using template member function
class Point
{
    private:

    public:
        value_type _x;
        value_type _y;
        Point(value_type x, value_type y) : _x(x), _y(y) {}

        template <typename Algo> requires IDistanceStrategy<Algo, Point>
            value_type distance(Point p2, Algo algo)
        {
            return algo.distance(*this, p2);
        }

};

// Stateful ... Point2 has an embedded algorithm
template <typename Algo>
    class Point2
{
private:
    Algo _algo;

public:
    value_type _x;
    value_type _y;
    Point2(value_type x, value_type y, Algo algo) : _x(x), _y(y), _algo(algo) {}
    
    value_type distance(Point2 p2)
    {
    
        return _algo.distance(_x, _y, p2._x, p2._y);
    }

};

// Specific algorithms
class Pythagoras
{
public:
    Pythagoras() {}
    value_type distance(Point p1, Point p2)
    {
        return std::sqrt((p1._x - p2._x)* (p1._x - p2._x) + (p1._y - p2._y) * (p1._y - p2._y));
    }
};

class Pythagoras2
{
public:
    Pythagoras2() {}
    value_type distance(value_type x1, value_type y1, value_type x2, value_type y2)
    {
        return std::sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
    }
};

// Global function with algorithm as argument
template <typename Algo> requires IDistanceStrategy<Algo, Point>
    double func(Point p1, Point p2, Algo algo)
{
    return algo.distance(p1, p2);
}

int main()
{
        Point p1(0.0, 0.0);
        Point p2(1.0, 1.0);

        Pythagoras algo;

        std::cout << p1.distance(p2, algo) << '\n';
        std::cout << func(p1, p2, algo) << '\n';
        
        Pythagoras2 algo2;
        Point2<Pythagoras2> pa(0.0, 0.0, algo2);
        Point2<Pythagoras2> pb(1.0, 1.0, algo2);

        value_type dis = pa.distance(pb);
        std::cout << dis;
}
 

Daniel Duffy

C++ author, trainer
Forthcoming book

Modern Multiparadigm Software Architectures and Design Patterns

with Examples and Applications in C++, C# and Python

Volume I

Daniel J. Duffy, Harold Kasperink



Datasim Press
Publish Date Q3/Q4 2023
 
Last edited:

Daniel Duffy

C++ author, trainer
Tiobe, who shares a passion for high-quality software with Qt, is providing quality assurance services. Tiobe tests 1 billion lines of software code for its customers, such as Phillips, Bosch, ST, Huawei, and ABB, each day. Tiobe has been awarded a Programming Language of the Year title since 2003.


 
Tiobe, who shares a passion for high-quality software with Qt, is providing quality assurance services. Tiobe tests 1 billion lines of software code for its customers, such as Phillips, Bosch, ST, Huawei, and ABB, each day. Tiobe has been awarded a Programming Language of the Year title since 2003.


Thanks for sharing! I looked into how the index was calculated, and some questions naturally arose.

I haven't looked into the nitty-gritty, as my time is better spent elsewhere, but: "The index is calculated from the number of search engine results for queries containing the name of the language.[3] The index covers searches in Google, Google Blogs, MSN, Yahoo!, Baidu, Wikipedia and YouTube. The index is updated once a month.", as per Wikipedia.

Would this be the most appropriate measure? I'm curious to know if there isn't some sort of adjustment factor for the 'difficulty' of the language. As you would find in signal theory, having such an adjustment would let us focus only on the very abstract 'popularity' of the language, while abstracting for variables such as the difficulty of the program (let alone setting things up, compiler issues, etc. on top of the actual coding) which should not contribute to the popularity of the language.

Thoughts? @Daniel Duffy
 

Daniel Duffy

C++ author, trainer
How many years of meditation to achieve this? I'm envious
“Carefully observe oneself and one’s situation, carefully observe others, and carefully observe one’s environment. Consider fully, act decisively.”
Seriously, I was the first OOP/C++ programner in NL in 1989 and I built a company around it.

So, it's nice to hear from the Dutch company Tiobe that claims C++ is numero uno. I knew it all along :ROFLMAO:
 
Last edited:
Top