DIP 1008 Preliminary Review Round 1

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Sat May 20 12:36:11 PDT 2017


On Sat, May 20, 2017 at 03:05:44PM +0000, Stefan Koch via Digitalmars-d wrote:
> On Saturday, 20 May 2017 at 14:59:37 UTC, Ola Fosheim Grøstad wrote:
> > On Saturday, 20 May 2017 at 13:36:14 UTC, Stefan Koch wrote:
> > > unions and other ABI-related things will be tricky.
> > 
> > Isn't the unions issue quite easily solved by tagging behind the
> > scenes?
> 
> Ah tagging behind the scene is an option, it comes with runtime cost
> though.  And tagging would disallow the tricky and very common usecase
> of overlaying and int and a float.
> 
> This I understand, is heavily used.

We only need this for floating-point operations.  The current CTFE
engine already special-cases floats for repainting, so we could
potentially just special-case unions involving floats and leave
everything else unsupported.  Supporting unions in CTFE can be a bear.


T

-- 
Computers aren't intelligent; they only think they are.


More information about the Digitalmars-d mailing list