[Ecls-list] Status of CVS

Gabriel Dos Reis gdr at integrable-solutions.net
Mon May 12 16:13:50 UTC 2008


On Mon, May 12, 2008 at 9:12 AM, Juan Jose Garcia-Ripoll
<jjgarcia at users.sourceforge.net> 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.

I *knew* the code was broken (at least with respect to Common Lisp)
-- that is why I was *porting* it.  The code was working and is still
working with GCL, but for various reasons, I decided to clean it
and port it to SBCL, CLisp and ECL.  The task had been
much easier with SBCL than with ECL, partly because of that
behaviour (however nonstandard it might be), and partly because
the SBCL compiler had proven to be much more robust.
I had promoted ECL for Axiom -- see Waldek's work/reports -- but
frankly, at time I had been amazed by the relative intolerance of
some Lisp translator writers.

>  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'm a compiler writer too -- language designer when needed, and
I have a first hand experience in in evolving a language used by over
3 millions of programmers. What programmers do may be annoying
but sometimes, we compiler writers tend to forget how
programmers get `to do' what they are doing -- in particular, they
may have inherited codes they did not author in the first place.

I'm sure you know this, but a good compiler is not just one that
follows the letter of the standard;
a good compiler is one that assists in getting the *job done*.  It is most
annoying when compiler writers (and I happen to occasionally commit
that sin as GCC contributor) decide to moralize on what programmers do
-- they can
quickly alienate otherwise committed supporters.

>
>
>  >  >  So, from now on, ECL will follow this nonstandard behavior and also
>  >  >  generate safety checks if SAFETY >= 1.
>  >
>  >  Excellent!  If the check were cheap, I would even suggest to add them
>  >  at safety 0.
>
>  Type checks can be expensive. Why do you want to enforce them on
>  people at all levels?

I believe that sentence starts with *If the check were cheap*.

Best,
-- Gaby




More information about the ecl-devel mailing list