This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


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

Re: Bad define placement?


> From: Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
> 
> Keith Wright <kwright@tiac.net> writes:
> 
> > Guile used to implement this extension, but as far as I
> > know it was never documented that it did so.
> 
> This was never an "extension".  It was a side-effect of the
> implementation, which, BTW, was truly buggy, sometimes leading to
> seemingly inconsequential results or segmentation faults.  (I thought
> you were one of the people reporting this.)

Indeed I was.  And I am very glad that it no longer chokes.
Reporting an error is a big improvement.  Thank you to anyone
who had a hand in fixing that.

People who now have broken code should re-write it thus

(let()
  (define a <a-expr>)
  <b-expr>
  (define c <c-expr>)
  <result>)

becomes

(let((a #f)(c #f))
  (set! a <a-expr>)
  <b-expr>
  (set! c <c-expr>)
  <result>)
  
this simple change will make the program portable to any
RnRS Scheme implementation.  Discussion of extensions
should go to comp.lang.scheme.

> Jim has made a policy decision that we will, in most respects, be
> R5RS compatible and I think that is very wise.

Damn right.  Quit whining and fix your broken DEFINEs.  You
don't need extensions.

> So is it a bug if, in the course of fixing a true and serious bug,
> you remove an undocumented extention?  I suppose the answer depends
> upon whether you meant to do that.

So there's the answer.  We meant to do it.  The bug is in the
program that depends on order of evaluation, not in Guile.

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