shouting versus dotting
Benji Smith
dlanguage at benjismith.net
Mon Oct 6 03:39:29 PDT 2008
Andrei Alexandrescu wrote:
> One morning I woke up with the sudden realization of what the problem
> was: the shouting.
Here's my (nutty) opinion:
Neither the "!" nor the "." really want to be there. I think the
language really *wants* to be using a bare set of parens for templates.
Because the language actually wants templates and functions to converge.
Instead of a special-case syntax for templates, and a set of special
rules for CTFE, and a whole set of parallel "static" statements (if,
else, foreach) and a special compile-type-only type construct (tuples),
just let D be D, either at runtime or compile type.
If a function could return a Type, and if that type could be used in a
Type Constructor, then you'd have all the magic template sauce you'd
need, and templates could happily converge themselves with regular
functions.
Hey! I told you it was going to be nutty!!!
<g>
--benji
More information about the Digitalmars-d
mailing list