On Mon, 31 Dec 2018 11:51:34 -0500
Barry Margolin <
bar...@alum.mit.edu> wrote:
> In article <
8wvbGEkWOldthA...@bongo-ra.co>,
> Spiros Bousbouras <
spi...@gmail.com> wrote:
>
> > If I type at the REPL
> >
> > (defmacro mac (arg) (unless (integerp arg) (error "mac : Not an integer")))
> > (list (ignore-errors (mac "")) 44)
> >
> > , SBCL returns (NIL 44) but ECL throws me into the debugger. Is the
> > behaviour of ECL conforming ?
>
> The REPL is not fully specified in CL. In particular, it never says
> whether the entire form is compiled first, and then executed, or it
> interprets it incrementally.
>
> IGNORE-ERRORS establishes a dynamic runtime environment in which errors
> are ignored. If the entire form is compiled first, the error will occur
> during compilation, not when the expanded code is executed. In this
> case, the error should throw you into the debugger.
>
> But if it's evaluated or compiled incrementally, the error doesn't
> happen until you're expanding the macro within the execution of the
> IGNORE-ERRORS body, and the error is suppressed.
>
> Since the REPL isn't specified fully, both are probably conforming.