|
|
|
|
|
by jcelerier
1493 days ago
|
|
In C++ I very often find myself wanting to have the ability to define a type inline - e.g. my ideal syntax would look like int z = 1;
auto x = [=] { .foo = z, .bar = {4,5,6}, .baz = "" };
Combined with the ability to introspect things at compile-time available in c++20, I think that this would get 99% there for common data-oriented design designs, without the need for a completely new programming language such as Ballerina. |
|
(No, I do not use it in production, it is mostly a fun curiosity, but yes, I wish lightweight named tuples were part of the language).