> On Nov 3, 2015, at 12:32 PM, Alex Knauth <alexan...@knauth.org> wrote:
> 
> 
>> On Nov 3, 2015, at 3:01 PM, 'John Clements' via Racket Users 
>> <racket-users@googlegroups.com> wrote:
>> 
>>> On Oct 29, 2015, at 10:01 AM, Marco Faustinelli 
>>> <marco.faustine...@onebip.com> wrote:
> 
>>> I see that during a debugging session I can hover above an expression and 
>>> rightclick to send its value to the console or so set! it something else.
>>> 
>>> What I would like to do is evaluate complete expressions at will using the 
>>> current context where the debugger is. For example, type expressions and 
>>> commands in the interactions area and see immediately their value.
> 
>> Short answer: no, I don’t think you’re missing anything. :)
>> 
>> Longer answer: evaluating *arbitrary* code while the program is halted would 
>> be difficult to reconcile with a compiled language. For instance, if my 
>> compiler has decided to inline a function, and in the debugger I alter the 
>> definition of this function, my compiled code is now invalid. 
> 
> Would it be possible if in this mode, set! was disallowed unless it was 
> already mutable? (And if it's already mutable it wouldn't be inlined, right?)
> 
> That way it could never invalidate inlined code?
> 
> Or would it also be a problem if there is a break point within a function 
> that happens to be inlined, and the arguments were constants, which were 
> propagated, and the names aren't there in the environment anymore? Is that 
> the problem?

This is a question about the compiler, and … I’m really not qualified to answer 
it :).

With that said, I do see that if you could somehow limit yourself to purely 
functional calls, you might conceivably be okay.

Unfortunately, there’s another whole can of worms, which is the tower of module 
evaluations that’s necessary to compile code.  What if the code you try to 
write winds up referring to a module that’s no longer around, and can’t be 
recreated without re-simulating the whole compilation process? This sounds like 
a nearly insurmountable problem.

John



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to