1.0 ?? [templates and currying]

Tom S h3r3tic at remove.mat.uni.torun.pl
Mon Nov 6 16:07:50 PST 2006


Walter Bright wrote:
> Don Clugston wrote:
>> I have a vague intuition that template tuples will enable some serious 
>> innovation in that direction. It scares me at the same time, because 
>> there's *so much* unexplored territory.
> 
> It's fun pulling on that string and seeing where it goes! For example, I 
> now have a working Curry template, which will curry *any* function or 
> delegate.

Interesting ! :) Can it handle partial currying ? My Bind lib is also 
about function/delegate currying, with arbitrary partial currying, 
parameter swizzling and function composition. The only thing that it's 
currently lacking is support of 'out', 'inout' and 'lazy' parameters. 
But this cannot be done without more info from the compiler. Would it be 
hard on your side to add more meta-info for functions and delegates ? 
I'm sure many people would appreciate the ability to extract parameter 
types, their count and a return value type for functions and delegates. 
The current approach to obtain this kind of meta-info is well 
demonstrated in the 'meta' package of Pyd: 
http://www.dsource.org/projects/pyd/browser/trunk/infrastructure/meta


--
Tomasz Stachowiak



More information about the Digitalmars-d mailing list