new D2.0 + C++ language

bearophile bearophileHUGS at lycos.com
Fri Mar 20 21:04:56 PDT 2009


Jarrett Billingsley:
> > Pointer syntax of Pascal is better, and the :=  = often avoid the C bugs like if(a = b).
> 
> Which isn't a problem in D ;)

Let's say D has a workaround to patch most of that C-syntax hole :-)
And I'll never like C pointer syntax.


> That's actually pretty nice.

An alternative syntax that avoids the two nested {{}}:
Lambda functions:
{int x -> x*x}
{x -> x*x}
{float x, float x*y}
Lambda delegates:
{int x => x*x}
{x => x*x}
{float x, float y => x*y}

I may even like that :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list