__traits proposal possible? or must be AST macros?

2010-01-12 Thread Álvaro Castro-Castilla
I want to propose a new __traits to extract the raw code in a function and/or class. Getting that as a compile-time string would allow for compile-time transformations of that code. Just as the Blade library (by Don Clugston) uses mixins to inject code generated from expressions, this could mo

Re: "Almost there" version of TDPL updated on Safari Rough Cuts

2009-12-11 Thread Álvaro Castro-Castilla
Sean Kelly Wrote: > dsimcha Wrote: > > > == Quote from Sean Kelly (s...@invisibleduck.org)'s article > > > dsimcha Wrote: > > > > > > > > This is great for super-scalable concurrency, the kind you need for > > > > things like > > > > servers, but what about the case where you need concurrency mo

Re: "Almost there" version of TDPL updated on Safari Rough Cuts

2009-12-10 Thread Álvaro Castro-Castilla
Andrei Alexandrescu Wrote: > http://my.safaribooksonline.com/roughcuts > > The current version includes virtually the entire book except (a) > overloaded operators, (b) qualifiers, (c) threads. In the meantime I > have finished the new design and wrote the chapter on overloaded > operators. Th

Re: dynamic classes and duck typing

2009-11-30 Thread Álvaro Castro-Castilla
try it. It does. Shouldn't this work also? struct foo { void opDispatch( string name, T... )( T values ) { } } void main( ) { foo f; f.bar( 3.14 ); } Álvaro Castro-Castilla

Re: We should deprecate C-style declarations

2009-11-16 Thread Álvaro Castro-Castilla
Don Wrote: > Before TDPL is published, I think we should finally get rid of C-style > declarations. Supporting two styles of declarations just causes > confusion, and AFAIK it doesn't have any benefits -- for example, it > doesn't significantly help in porting code from C. D declarations are >