D Lang'99 & Its future

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Feb 8 18:28:21 UTC 2022


On Tue, Feb 08, 2022 at 06:19:55PM +0000, Salih Dincer via Digitalmars-d wrote:
> Hope, D will go on to the next version,
> the compiler will release up to v10!
> 
> Many happy returns of the (D)ay...🥳
> 
> ```d
>   enum Dlang99 = 4026728633831507;
> 
>   union Magic
>   {
>     long data;
>     char[8] bits;
> 
>     string toString()

In latest dmd git HEAD, you need to annotate this function with
`return`, because it escapes a reference to `this`. :-)


>     {
>       return bits;
>     }
>   }
>   auto magic = Magic(Dlang99<<10|'D');
>        magic.writefln!"..::%s::..";
> ```


T

-- 
WINDOWS = Will Install Needless Data On Whole System -- CompuMan


More information about the Digitalmars-d mailing list