[Ecls-list] Status of CVS

Waldek Hebisch hebisch at math.uni.wroc.pl
Mon May 12 14:53:39 UTC 2008

Juan Jose Garcia-Ripoll wrote:
> On Mon, May 12, 2008 at 4:06 PM, Gabriel Dos Reis
> <gdr at integrable-solutions.net> wrote:
> > On Mon, May 12, 2008 at 3:53 AM, Juan Jose Garcia-Ripoll
> >  <jjgarcia at users.sourceforge.net>
> > >  So why is this so? The reason is that SBCL (and probably CMUCL)
> >  >  automatically inserts type checks at the beginning of this function.
> >  >  These checks will ensure that the arguments of the function have the
> >  >  right types or, otherwise, enter the debugger.
> >
> >  I've found that behaviour highly helpful when porting Axiom to SBCL -- in
> >  contrast, ECL's compiler would silently die with `mysterious' files
> >  left all over  the places. It is an invaluable debugging tool, especially when
> >  porting legacy codes  to newer systems.
> Perhaps, but that also shows the code is broken. So it can be
> understood as a debugging tool, but given that it is not specified in
> the standard as a portable behavior, I find it really annoying that
> programmers rely on that instead of using their own check-type forms.

I do not understand your argument.  AFAICS if code is correct it should
run both in sbcl and in other Lisps.  If code is wrong than implementations
which insert checks nicely report error while other Lisps crash or run
code ignoring problem.  Ignoring problems seem to be in Lisp spirit,
but it makes finding bugs much more difficult.

Concerning programmer written check forms: to require them for debugging
looks backwards for me.  Namely, inserting such check by hand is
unmanagable.  Macros are likely to generate many excess checks, which
even if redundant are hard to eliminate.  Also, inserting correct
calls to checking macros still takes significant effort.  In real
life alternative is between code which has no (or too little)
checks and automatically generated checks...

The only drawback to automatically generated checks is possible
slowdown and bigger executables.  But if checks are suppressed
at safety 0 than IMHO this is OK.

                              Waldek Hebisch
hebisch at math.uni.wroc.pl 

More information about the ecl-devel mailing list