Herb Sutter's CppCon talk "Extending and Simplifying C++: Thoughts on Pattern Matching using `is` and `as`"

Elronnd elronnd at elronnd.net
Tue Nov 2 05:55:15 UTC 2021


On Tuesday, 2 November 2021 at 01:18:02 UTC, deadalnix wrote:
> 9. Functional programming and attribute soup. Because it is not 
> possible to define attribute in a way that depends to functions 
> passed as argument, it is not possible to compose anything in a 
> functional way without assuming that everything is impure, 
> throw and uses the GC and more.

I agree with almost all of these, but this one especially.

A side effect of the lack of attribute polymorphism is that 
instead of making things take function parameters, you make them 
templates with alias parameters, making template bloat even 
worse.  For an idea of the impact this can have: I got a 10% 
improvement in compile time on a medium-sized codebase by using 
eager versions of std.algorithm in debug builds.


More information about the Digitalmars-d mailing list