This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SLIME backend


* Jim White [2008-05-28 02:37+0200] writes:

> Adapting the SLIME backend to JSR-223 could be quite helpful.  While
> most JSR-223 engines focus on compiling independent scripts, using it
> for stateful interpreter interaction can also be done (I recently
> whipped up one for Scala) and it actually better for incremental work
> such as in Emacs and Wings.

That's an interesting idea.

>
>>   * the JVM ain't a Lisp Machine (and never will be)
>
> Well, I know what you're saying, but maybe it will.

I was mostly thinking about debugging.  Debuggers for Common Lisp
usually interact with CL's condition system in particular with
HANDLER-BIND.  But Java's error handling strategy, throwing an
exception, is rather incompatible with HANDLER-BIND.  This makes it
very hard to support 'debug-on-error' style debugging.

On the JVM it's rather difficult to decide if and where an exception
will be caught without unwinding the stack.  But invoking the debugger
after unwinding the stack is usually too late, because the most
interesting frames are those at which the exception was thrown.

Python seem to solve this dilemma by including information about local
variables in exception objects.  The SLIME backend does same, but such
a strategy is very expensive and will probably never become popular on
the JVM.

[BTW, I always wonder how expensive fillInStackTrace is.  Is there a
 trick to make this cheap or is it as expensive as it sounds?]

Helmut.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]