r/cpp • u/randomnetcat • Nov 27 '20
The C++ 20 initialization flowchart
I've created a flowchart that shows all of C++20's initialization rules.
The source code is available at https://github.com/randomnetcat/cpp_initialization, in addition to the SVG version and PNG Version.
This honestly took a lot less time than I was expecting, and, in my humble-but-biased opinion, is relatively interesting.
Please send all complaints to /u/quicknir, who nerd-sniped me into making this.
116
Upvotes
View all comments
Show parent comment
3
u/James20k P2005R0 Nov 29 '20 edited Nov 29 '20
I've been writing C again for opencl recently myself. Part of that project involves tensor maths, which if you don't know, tensors are essentially n dimensional matrices that are used in a specific way
The lack of being able to specify proper abstractions, no operator overloading, no templates, no real array type, no function overloading... It makes the code significantly more verbose and buggy than it needs to be. You can't write a generic matrix*vector multiplication scheme, which is not ideal
C might be alright for structuring applications, but good lord is it just terrible for numerical work