DIP 1008 Preliminary Review Round 1
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Sat May 20 10:24:05 PDT 2017
On Saturday, 20 May 2017 at 15:05:44 UTC, Stefan Koch wrote:
> Ah tagging behind the scene is an option, it comes with runtime
> cost though.
(I guess you meant compile-time cost)
> And tagging would disallow the tricky and very common usecase
> of overlaying and int and a float.
>
> This I understand, is heavily used.
So this is allowed by the language spec? Anyway, since
compile-time is harder to debug than run-time that seems to be a
reasonable restriction.
(C++ has this restriction as a general rule: one are only allowed
to read from a union field if it was the most recently written
to.)
More information about the Digitalmars-d
mailing list