Is using a union through more than one member legal in D?
bearophile
bearophileHUGS at lycos.com
Tue May 4 15:07:30 PDT 2010
div0:
> Just cause you don't like the feature doesn't mean it's unclear, buggy
> or otherwise pointless.
In this discussion I was talking about two different things:
1) In that answer of mine with the word "undecided" I meant that there are D parts where D specs don't state how a correct D implementation has to behave. For example, how can you be sure that D unions follow the C99 specs?
2) Even if D officially adopts part of C99 specs for some D features, like unions, there can be ways for D to improve its situation compared to C99 (and keep backwards compatibility with C99). For example in D it can be added a syntax/way to more safely perform some unsafe idioms sometimes used in C, like using unions to cast types statically, or to avoid the need of things like the "-fno-strict-aliasing" switch of GCC, etc.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list