Syntax changing
so
so at so.so
Mon Jun 6 08:29:41 PDT 2011
On Mon, 06 Jun 2011 00:11:47 +0300, Monkol <dj_mon at mail.ru> 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
No it is not, but if you were talking about templates arguments rather
than single argument, you'd have your case.
fun!(T1, T2, ... TN)(A1, A2, ... AN);
vs
fun<T1, T2, ... TN>(A1, A2, ... AN);
More information about the Digitalmars-d
mailing list