Which patches/mods exists for current versions of the DMD parser?

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 8 17:41:25 PDT 2014


Am Mon, 08 Sep 2014 19:12:22 +0200
schrieb Timon Gehr <timon.gehr at gmx.ch>:

> On 09/08/2014 07:00 PM, Marco Leise wrote:
> > Am Mon, 8 Sep 2014 18:34:10 +0300
> > schrieb ketmar via Digitalmars-d <digitalmars-d at puremagic.com>:
> >
> >> On Mon, 08 Sep 2014 17:25:07 +0200
> >> Timon Gehr via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> >>
> >>> int square(int x)=>x*x;
> >> noted.
> >
> > To clarify:
> 
> The above is not valid D 2.066 syntax.
> Your apparent confusion supports a point I made in favour of it some 
> time ago though. My post was about function declaration syntax, not 
> squaring numbers. I assume Ola will still want to support x² though. :o)

I have to say, that was clever. I really didn't notice the
wrong syntax until now. It doesn't get my vote though to keep
some uniformness in function/method definitions. One time fire
and forget lambdas are something different. They appear in the
middle of expressions etc.

> > There is x^^2, but the implementation uses pow(x,2)
> 
> Is this really still true?
> 
> > and presumably yields a "real" result
> 
> No, both pow(x,2) and x^^2 yield an 'int' result.

Ok, memorized.

-- 
Marco



More information about the Digitalmars-d mailing list