shouting versus dotting

Simen Kjaeraas simen.kjaras at gmail.com
Wed Oct 8 13:02:18 PDT 2008


On Mon, 06 Oct 2008 12:39:29 +0200, Benji Smith <dlanguage at benjismith.net>  
wrote:

> 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

That would only work for templated functions, though. What about templated  
types?

-- 
Simen



More information about the Digitalmars-d mailing list