Serving the Quantitative Finance Community

 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

C++26

January 21st, 2025, 7:39 pm

C++26 will support
  • Oxford variadic comma, i.e. "Deprecate ellipsis parameters without a preceding comma. The syntax 
    Code: Select all
    (int...)
     is incompatible with C,  detrimental to C++, and easily replaceable with  
    (int, ...)
     .
 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: C++26

February 8th, 2025, 2:05 pm

Standard C++ is still lacking standardized future continuation. Boost has “experimental” implementation that is 11 years old. In the meantime, at least three major proposals were brought before the standard committee, but none made it into the standard. Current proposal is 190 printed pages long. The earliest it can become standard is C++26, and even that is not guaranteed. Such glacial speed of change results in a lot of confusion and feature lag behind other languages. C# had continuations since 2010, and JavaScript since 2015 (EC6). While C++ 11 was relatively on par with the industry when introducing futures, current C++ is quite behind the crowd. “Experimental”  code should not stick around for over a decade in any library, and especially in a semi-standard library like Boost. There must be a way to solve problems faster.
 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: C++26

February 15th, 2025, 7:23 pm

I know for a fact that it took 3 years to approve std::clamp().
Committee-driven meetings etc.

https://en.cppreference.com/w/cpp/algorithm/clamp
 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: C++26

February 17th, 2025, 11:04 am

Large, complex applications are kind of not feasible in C++, but never say never I suppose. There is a missing vocabulary in how (C++) developers communicate. Even at a basic level, "modular programming" is an alien concept. "Divide and Conquer" aka as task and dependency graphs (finding potential concurrency) is not used, it seems.

ADLs is a logical next step but it will a while before it becomes mainstream. It is system engineering.

https://en.wikipedia.org/wiki/Architect ... n_language

The announced streams of new features in C++ are worrying.

101 Example Monte Carlo by system decompositiom and black boxes
https://onlinelibrary.wiley.com/doi/epd ... wilm.10647
 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: C++26

February 21st, 2025, 7:42 pm

That's real specialised. 
 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: C++26

February 28th, 2025, 10:43 am

Perhaps the language is badly designed, if it takes so long to add innocent features to it.
That's probably true.

C++ has coroutines that are very specialised and nice to have. Boost coroutines are more intuitive.

But they should have first done continuations which is a special case of a coroutine in a sense.
 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: C++26

July 10th, 2025, 10:43 am

Execution Control Library

https://en.cppreference.com/w/cpp/execution.html

Who wudda thought that?
 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: C++26

July 17th, 2025, 10:42 am

Execution Control Library

https://en.cppreference.com/w/cpp/execution.html

Who wudda thought that?
Looked at the example... all this `std::move` calls, why do we have to type them out?
Event-driven systems/style work by message-passing (no shared data), so std::move sounds reasonable. 
No doubt the code could be improved, but the intent is clear.

// like an embryonic actor model (data isolation).
 
User avatar
Cuchulainn
Topic Author
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: C++26

July 18th, 2025, 9:35 am

I guess my complaint is: if std::move is such a fundamental feature of modern C++, why can't syntax support its use in a less wordy way. Why do we need the "std::" part? Make "move" a language keyword.
Easier said than done.
Syntactic niceties.. and maybe we want to overload it etc.
template <class T> void swap(T& a, T& b)
{
   T tmp(::boost::move(a));
   a = ::boost::move(b);
   b = ::boost::move(tmp);
}