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: "<Brad Knotwell" <knotwell@f5.com>
> 
> Along the same lines, code like this contrived example worked in
> guile1.3 but doesn't work now:
> 
> 	(define (test-fun x)
> 	  (define tt? (eq? x 3))
> 	  (define return-val
>              (if tt? #t #f))
> 	   return-val)
> 
> Is this a bug related to the currently discussed one, a brand new
> bug or an incorrect method that took advantage of a previous bug in
> guile?

Define "bug".

The program is undefined according to RnRS, because the order of
evaluation of internal defines is (explicitly) unspecified.

On the other hand, nothing forbids evaluation in the order
written, and in my opinion to do so would be an excellent extention
to RnRS (better than about half the extentions Guile actually does make).

Guile used to implement this extention, but as far as I
know it was never documented that it did so.  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.

-- 
     -- Keith Wright  <kwright@free-comp-shop.com>

Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com>
         ---  Food, Shelter, Source code.  ---

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