idea: Templates + AJAX = breakthrough application

Ary Borenszweig ary at esperanto.org.ar
Mon Nov 19 15:17:58 PST 2007


BCS escribió:
> Reply to Robert,
> 
>> 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.
>>
> 
> that's what I was thinking of, you end up with template at some point. 
> If nothing else you get:
> 
> char[] CTFEfunc(T)(T t){...}
> 
> 
>>> 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.
>>
> 
> sweet, will it also do mixin unfolding? this would be where you can 
> expand a mixin in the editor to the text it expands to. This would 
> however require the ability to pin template parameters and 
> unfold/evaluate that as well. Whatever happens, it will be fun to see.

We already can do that: we've ported all of DMD's semantic, so 
everything DMD ('s frontend) knows, we also. :-)

We just need a nice and clean way to show it in the UI... plus all the 
other, more important features, first.



More information about the Digitalmars-d mailing list