SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 2

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

C++20

Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

katastrofa
Posts: 9576
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: C++20

Grodesby
Posts: 2
Joined: August 15th, 2010, 4:07 pm

Re: C++20

Nice rant on the state of the Modules Tech Spec:
https://izzys.casa/posts/millennials-ar ... es-ts.html

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: C++20

Nice rant on the state of the Modules Tech Spec:
https://izzys.casa/posts/millennials-ar ... es-ts.html
Means it's not shipping any time soon.
C# has got its act together, C++ muddling along.
https://msdn.microsoft.com/en-us/library/ms973231.aspx
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

ExSan
Posts: 4582
Joined: April 12th, 2003, 10:40 am

Re: C++20

katastrofa
Posts: 9576
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: C++20

All I understood from that rant is that (C++?) modules are not what I (a millennial) think they are So I checked again and, as I thought, C++ modules obviously don't require headers, and consequently give considerable compile time improvement (which also saves development and debugging time) and don't use preprocessor, which translates to neater and more transferable code (not perfect, but always something). I'm sometimes curious what kind of a job and code some people do that they seem to be affected by every possible flaw of the C++ features... Luckily, I'm not one of them.

I had a chance to appreciate the effectiveness of using modules in Fortran in my old research institute, when I and my colleagues were able to import over 10-year-old code written by people we hadn't even met, and re-use it in a straightforward manner. I've heard that large firms have decisive power in the C++ standard development. Since modules are perfect for large projects (i.a. for the above reasons) I'm surprised that they didn't materialise in earlier versions.

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: C++20

Are modules self-describing and capable of reflection?
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: C++20

PPL and TBB already support C++ multitasking, parallel design patterns and more.
The standard has to catch up..

Parallel ST:L algorithms in C++17.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: C++20

Spaceship operator in C++20; saves a lot of code intake
class Point
{ // Generate spaceship operators

int x;
int y;
public:
Point(int X, int Y) : x(X), y(Y) {}

auto operator<=>(const Point&) const = default;
// ... non-comparison functions ... 'natural' comparison
};
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: C++20

C++23 plans
• Any C++23-era WG21 subgroup meeting works on no other new material until all possible progress on these items is exhausted first. As stated in the abstract, these items are. ...
• Library support for coroutines. ...
• Executors. ...
• Networking. ...
• A modular standard library. ...
• Reflection. ...
• Pattern matching. ...
• Contracts.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

ISayMoo
Posts: 2366
Joined: September 30th, 2015, 8:30 pm

Re: C++20

It feels like they're trying to become everything to everyone.

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: C++20

I am wondering when keyword virtual will become a thing of the past and purged by the high priests.

std::signals2, CRTP and parametric polymorphic design patterns would be better (e.g. boost::factory<>).

C++ is looking like a mini-Haskell. Still quite a bit of boiler-plate code but it is getting better.

//
Even 30 years ago, I stated Composition >> Inheritance. It should be possible to do it as part of the language in a generic way, like  an Architectural Description Language (ADL). This would lead to a new era of software plumbing and assembly, especially with C++17 Concepts. But that is not the way developers think at the moment. Many are syntax and bottom-up driven.

Like a ball and socket. All the outdated GOF patterns can be subsumed under this new paradigm.

Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

katastrofa
Posts: 9576
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: C++20

Apropos the future of programming (and programmers). According to GPT-3, syntax = concept.

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: C++20

Apropos the future of programming (and programmers). According to GPT-3, syntax = concept.
I doubt they have studied Wittgenstein.
Sounds like the AI fantasy carousel all over again.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 62896
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: C++20

Jonathan Swift describes similar attempts by the Laputans

Six hours a day the young students were employed in this labour; and the professor showed me several volumes in large folio, already collected, of broken sentences, which he intended to piece together, and out of those rich materials, to give the world a complete body of all arts and sciences; which, however, might be still improved, and much expedited, if the public would raise a fund for making and employing five hundred such frames in Lagado, and oblige the managers to contribute in common their several collections.

He assured me “that this invention had employed all his thoughts from his youth; that he had emptied the whole vocabulary into his frame, and made the strictest computation of the general proportion there is in books between the numbers of particles, nouns, and verbs, and other parts of speech.”

Another great advantage proposed by this invention was, that it would serve as a universal language, to be understood in all civilised nations, whose goods and utensils are generally of the same kind, or nearly resembling, so that their uses might easily be comprehended. And thus ambassadors would be qualified to treat with foreign princes, or ministers of state, to whose tongues they were utter strangers.

Swift must have been thinking about software or AI here

There was a most ingenious architect, who had contrived a new method for building houses, by beginning at the roof, and working downward to the foundation; which he justified to me, by the like practice of those two prudent insects, the bee and the spider.

Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl