The D Scripting Language
gooba
gooba at digitalmars.com
Tue Nov 16 06:00:03 PST 2010
spir Wrote:
> On Tue, 16 Nov 2010 09:44:06 +0100
> Per Ã
ngström <d-news at autark.se> wrote:
>
> > On 2010-11-16 01:10, Daniel Murphy wrote:
> > > I think allowing the second expression in the ternary operator to be omitted
> > > would be a better fit for D, and provide the same function.
> > >
> > > ie.
> > > auto x = a ? a : b;
> > > auto x = a ? : b;
> >
> > Personally I had '|||' in mind, but I'm OK with '?:'. I think it should
> > be one single token and not an extension of the tertiary operator, though:
> >
> > auto x = condition ? a : b; // tertiary operator
> > auto x = condition ? : b; // error, did you forget the middle operand?
> > auto x = a ?: b; // OK
>
> Yes, then it becomes a binary operator :-) Read "a if defined, else b".
>
>
> Denis
> -- -- -- -- -- -- --
> vit esse estrany â£
>
> spir.wikidot.com
>
They now added Scala to scriptometer http://rigaux.org/language-study/scripting-language/ it sees abomination i/o classes don't stop it being better script language then d. What can do? Scala bad competition and straight better. Next release has std.script?
More information about the Digitalmars-d
mailing list