On Mon, 06 Jun 2011 00:11:47 +0300, Monkol <[email protected]> wrote:
On Fri, 03 Jun 2011 00:36:42 +0300, Jonathan M Davis
<[email protected]> wrote:
On 2011-06-02 13:56, Nick Sabalausky wrote:
"Monkol" <[email protected]> wrote in message
news:[email protected]...
>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);