- float default is NaN, why... just WHY!!!!!
- char default is 0xFF....
when you expect things to be just 0, it is a pain to deal with and to remember...
Also the standard library, while useful, i wish it would make use of allocators
They have ``std.experimental.allocator`` packages, for some reason it still is experimental..
There is no tagged union.. you have to import a package for it ``std.sumtype``.. wich is bad when all other languages have built in support for that
Walter if you read this, please! union are useful, but lack of tagged union mean potential bugs in your union when you pick the wrong value...
Proposal for you:
enum MyTag { A, B, C}
union MyTaggedUnion: MyTag
{
DataA A,
DataB B,
DataC C
}
struct DataA{}
struct DataB{}
struct DataC{}
auto tgu = MyTaggedUnion.B;
switch (tgu)
{
case A:
tgu. /* implicit DataA */
break;
// need to implement every tags, or error
}