Open pamoroso opened 1 year ago
There's a lot that is questionable about Medley Lisp's behavior here. But the behavior of PL isn't really defined for a non-symbol argument. This might be s critique of Interlisp's Exec, which has at least 4 different ways of entry that overlap:
This is mainly from memory and there are likely cases I've missed. There are some commands that are debugger-only (BT) and the history commands might have a different implementation.
Commands take precedence if you have a special variable with the same name as a command -- e.g., I had a variable named DIR which I had to enter as (PROGN DIR).
The NLAMBDA functions are symbols -- case and package sensitive, so to call 'PP' in a common lisp exec you need to type IL:PP. (continued)
(continued) The difference between X and (QUOTE X) -- which can be typed or printed as 'X -- is one of the most difficult for newcomers to Lisp to get. PL is a "command" and doesn't evaluate its arguments.
PL 'X
can also be typed as pl (QUOTE X)
which isn't defined because the list (QUOTE X)
doesn't have a property list.
What I find unusual about the reported behavior is the break window instead of an error or warning printed in the Exec.
Generally, I think the code that runs a command should know that it is really an exec-typein, and therefore should never cause a break just because it can’t interpret its own arguments. Error or warning instead.
If something goes wrong in the code that it is actually trying to execute, then normal breaks should (not) appear, depending on depth, flags, whatever.
In this case, PL knows that it wants only an atom. If it gets something else (that it can’t obviously coerce, like stripping QUOTE), it should error/warn.
On Feb 7, 2023, at 6:15 AM, Paolo Amoroso @.***> wrote:
What I find unusual about the reported behavior is the break window instead of an error or warning printed in the Exec.
— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1073#issuecomment-1420846343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJOZ6KPVHOEDGCT7IHTWWJKJLANCNFSM6AAAAAAUSUJTTM. You are receiving this because you are subscribed to this thread.
Describe the bug Calling
PL
with a quoted symbol as argument opens a break window with the errorHelp! Shouldn't happen:
.To Reproduce Steps to reproduce the behavior:
Initial Exec
, selectInterlisp
Run Medley
PL 'SYM
Expected behavior No break window or error.
Screenshots The break window:
The full desktop:
Context (please complete the following information):
Additional context For
PL 'SYM
I'd expect a behavior similar toPL SYM
, i.e. no error or break. Or at most a warning printed to the output stream.