Three Unlikely Successful Features of D
Nick Sabalausky
a at a.a
Tue Mar 20 19:13:03 PDT 2012
"Adam D. Ruppe" <destructionator at gmail.com> wrote in message
news:txwnbkafemkurcqjermf at forum.dlang.org...
>
> 2) Leaving the parenthesis off of simple template
> instantiations is something I was against early on,
> and now I love it.
>
> IIRC, you wanted to use a different symbol entirely,
> and leaving the parens off was a compromise between
> the radical Unicode character proposal and Walter's
> conservative parenthesis.
>
> This is a really small change. At the time, it seemed
> like it would be stupid and useless.
>
Yea, that's a good one. I seem to remember initally thinking that it felt
sloppy, but I was otherwise relatively indifferent about it. But now I
absolutely love it...sooo much.
> But, would templates be as popular now if we didn't
> make this change?
>
> auto a = to!(int)("10");
>
> vs
>
> auto a = to!int("10");
>
Exactly.
Ooh, nested functions and closures are another good one (or two). I get so
much use of of those.
Speaking of, here's a good one (IMO): The syntax for delegate types (as
opposed to C's crude function pointer syntax). A small change, but really
helps open up the world of first-class functions, even just by itself.
More information about the Digitalmars-d
mailing list