Visual D evaluate simple functions for information
Josphe Brigmo
JospheBrigmo at gmail.com
Thu Sep 13 09:26:06 UTC 2018
Suppose one does something like
baseName(x);
When highlighting the mouse over x, it VD shows the value of x.
When highlighting over baseName, it shows the functional
information.
It would be nice if Visual D could evaluate the function at it's
value.
It should be really simple to do:
Check if the argument's value is known, in this case it is, since
it shows it to me. Check if the function can then be evaluated,
which it can as it is a library function.
Basically a sort of CTFE for visual D in that it can evaluate
functions a compile.
One thing I hate about D and visual D in general is that I almost
always have to create compile time variables just to see what is
going on.
By having such a feature, the computer will do all the work and
save significant time(from a few minutes to create the temp
variables, re-run the program, then remove them down to basically
0 seconds).
It would actually be nice if one could see the values in any
expression in a chain:
baseName(dire).stripExtension.toUpper....
Highlighting any of the functions will not just show
documentation information or evaluating known variables but also
evaluate the function on those variables if it can.
It can simply use a thread to try and evaluate the functions. If
they are library functions it should not be difficult but also
try functions in the user program. If they take too long simply
time out. Should solve most of the issues.
IT would really speed up develop in D.
Maybe even string mixins could be evaluated this by showing a
pop-up scrollable box with the expanded mixin and debug issues.
More information about the Digitalmars-d-ide
mailing list