idea: Templates + AJAX = breakthrough application

Robert Fraser fraserofthenight at gmail.com
Mon Nov 19 14:13:56 PST 2007


BCS wrote:
> The only clean way to do it still requiter that ctfeFunc be templated or 
> you cant get to any of the semantic info.

Sure you can. __traits, typeof(), is expressions... You can't pass 
around the types, though.

> Personably I'd rather not use mixins (my parser generator only uses them 
> in two place to generate numbered labels and a goto) My feeling is that 
> it's sort of going backwards in the abstraction domain. Also I'd rather 
> get a lex/syntax error that points to hard text rather than mixin text. 
> I find that a little CTFE, a little template functional programming and 
> a pile of tuple foreaches can get a LOT done.

Descent will soon (in Kramer time...) have the ability to mark errors at 
a location in a mixin... you still have to figure out where the problem 
is being created, but at least you can see exactly what the problem is.

> I would actually recommend playing around with template functional 
> programming a little (try some scheme or lisp first though).

I'll be learning that in school next quarter... Never done any 
functional programming, which may be why I'm so hesitant to adopt 
template-based programming fully.

> They are 
> remarkably not that nasty in D. OTOH that's me saying this and and I'm a 
> bit off in what I think of as nasty (my current project involves using 
> lisp to do code-gen for some nasty template Foo, but I get ahead of my 
> self ;-)

Heh; looking forward to it!



More information about the Digitalmars-d mailing list