alex wrote:
Yeah I just named it "Expression evaluation" - dunno why, just thought that it could be used in a more general way than 'only' for mixin insight.

Should I do an extra input box where you could type in expressions and other things that could be evaluated? Just thinking of a prototype of an interactive D script console or so.. :)

That sounds very useful. It would be awesome if you could evaluate the returned value of functions that already exist in your program, or (like your picture shows) write simple test functions to evaluate. Of course not all functions will work, but It would be great in some areas. So, just to be clear, say you have the following function in your project:

    int foo(int x, int y)
    {
        return x * y + 5;
    }

Then in the expression "command line", you just type:

    foo(1, 2)

Hit Enter, and you get a message: "7". You could also write larger test functions in the Expression Evaluation body (like in your screenshot) which could do more complicated stuff (still limited of course).

---

You just gave me an awesome idea though. I know this would be a ton of work (I'm not making a feature request here), but how realistic would it be with your system to do a "side-by-side" expression evaluation with "example data" (where applicable)? :D

Meaning, imagine your screen looks like:

    CODE                       | EXAMPLE RESULTS
   ------------------------------------------------------------
                               |
    int foo(int x, int y)      | params: (2, 3) // editable
    {                          |
        return x * y + 5       | returns: 11    // not-editable
    }                          |
                               |

That would simply amazing! I don't expect you to make that, lol, only want to know if it's possible (or foreseeable) with your expression evaluation engine. Is it?

Reply via email to