1.0 ?? [templates and currying]

Tom S h3r3tic at remove.mat.uni.torun.pl
Tue Nov 7 04:15:22 PST 2006


Walter Bright wrote:
> 
> Ok, so here's what I'll do unless someone objects:
> 
> ==delegate
> 
> remains the same
> 
> ==return
> 
> for functions, delegates, and pointers to functions, gets the return type
> 
> ==function
> 
> gets the prototype as a tuple (this breaks existing code)

It sounds fine, but it still lacks the ability to get the delegate type 
of a function... Unless, of course there is a way to derive the 
delegate/function type from a tuple and return type ;)


> Also, is there a need for:
> 
> ==class
> 
> getting the base class?

I'm sure someone would find a use case for that, but wouldn't it break 
existing code too ? Currently using 'class' inside IsExpression simply 
yields the same type as the one in question. An alternative approach 
would be to allow .super to be accessed from outside of a class, so 
typeof(Foo.super) would become a valid expression.


--
Tomasz Stachowiak



More information about the Digitalmars-d mailing list