On Sunday, 27 January 2013 at 12:05:28 UTC, alex wrote:
On Sunday, 27 January 2013 at 11:31:58 UTC, Dicebot wrote:
Gets better and better!

Makes me wonder though: if this works, may be it is possible to provide a context helper with mixin resulting code if all it parameters are already defined? Similar to C macro expansion helper in Eclipse.

So like.. you click somewhere in your document, have an extra panel in which you can enter an expression (even a CTFE call later on), and get your expressions evaluated? Sure - even stuff like template mixins or similar..no problem :) Uhm, even pre-defining variable contents shouldn't be a problem - then you would have a D math-script interpreter :D

No, a bit different. I.e.
---------
string gen(int num)
{
    return format("auto a = %s", num);
}

mixin(gen("42");
---------

And when you hover over "mixin" keyword, temporary modal window appears with content "auto a = 42". Or even separate panel with full compile-time feature expansion like it was in Descent, as Jacob suggests.

I suppose it is hard to have full CTFE engine now, but at least simple cases may be useful.

Reply via email to