Syntax changing

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jun 5 14:30:20 PDT 2011


On 06/05/2011 04:11 PM, Monkol wrote:
> On Fri, 03 Jun 2011 00:36:42 +0300, Jonathan M Davis
> <jmdavisProg at gmx.com> wrote:
>
>> On 2011-06-02 13:56, Nick Sabalausky wrote:
>>> "Monkol" <dj_mon at mail.ru> wrote in message
>>> news:op.vwgs7ypjcqe400 at pc-2010.dnepr.net.ua...
>>>
>>> >i think it is necessary to change template syntax and do as C++ style
>>> >template A <>, and not A !(), A <>. many people come from C++ and it
>>> will
>>> >be easy to adapt.
>>>
>>> I came from C++, and I found it easy to adapt. Plus, like it says in the
>>> link Steve gave, there are technical downsides to using <>.
>>
>> LOL. I use C++ in my job, but I use templates in D so much more than I
>> do in
>> C++ that I now end up using !() instead of <> unless I catch myself. I
>> actually ultimately much prefer !() - especially since you can reduce
>> it to
>> just ! when there's only one template argument and it doesn't have any
>> periods
>> in it.
>>
>> Though honestly, if a programmer can't get used to a slightly different
>> syntax, then they're screwed anyway. Every language has its quirks and
>> differences. Syntax is a very small part of all of that. Really, the
>> syntax is
>> the _easy_ part. It's the semantics where the real problems start as
>> far as
>> adapting to a new language goes.
>>
>> - Jonathan M Davis
>
> the statement to<float("123e2")> is more easy readable then
> to!float("123e2") for example

Except you ironically got the easily readable syntax wrong...

Andrei


More information about the Digitalmars-d mailing list