Re: [Chicken-users] set! on unbound variable

2016-09-24 Thread Dan Leslie
Particularly since Chicken is in the minority of Schemes that allow this behaviour. I'm not a fan of fast-and-loose binding and typing, personally; it's a source of too many mistakes. -Dan On 2016-09-24 5:14 PM, Derrell Piper wrote: > I agree that it's allowed but it would an optional warning

Re: [Chicken-users] set! on unbound variable

2016-09-24 Thread Derrell Piper
I agree that it's allowed but it would an optional warning would be very nice. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users

Re: [Chicken-users] set! on unbound variable

2016-09-24 Thread John Cowan
On Sat, Sep 24, 2016 at 11:39 AM, Dan Leslie wrote: > It seems that Chicken has a parameter to enforce R5RS strictness: > > > -r5rs-syntax disables the Chicken extensions to R5RS syntax > All that does is disable the syntax keywords that are normally available but are not

Re: [Chicken-users] set! on unbound variable

2016-09-24 Thread Dan Leslie
unspecified. >> >> 0: https://wiki.call-cc.org/man/4/The%20R5RS%20standard#assignments >> >> -Dan >> >> Sent from my BlackBerry 10 smartphone. >> *From: *Jinsong Liang >> *Sent: *Friday, September 23, 2016 6:27 PM >> *To: *chicken chicken >> *Su

Re: [Chicken-users] set! on unbound variable

2016-09-23 Thread Jinsong Liang
Then I think this seriously deserves a warning, because the code is not only against the standard, but potentially a bug, as shown in my case. Thank you everyone for your help! Jinsong On Fri, Sep 23, 2016 at 9:47 PM, Evan Hanson wrote: > Hi Jinsong, > > Not a bug, but

Re: [Chicken-users] set! on unbound variable

2016-09-23 Thread Evan Hanson
Hi Jinsong, Not a bug, but certainly something that can be confusing if you don't expect it. In your example, `helo` is implicitly defined as a toplevel variable at the point of `set!. The difference is noted (very, very succinctly) in the manual here:

Re: [Chicken-users] set! on unbound variable

2016-09-23 Thread Kon Lovett
signments > > -Dan > > Sent from my BlackBerry 10 smartphone. > From: Jinsong Liang > Sent: Friday, September 23, 2016 6:27 PM > To: chicken chicken > Subject: [Chicken-users] set! on unbound variable > > Hi, > > I have been tripped by the following mistake a few times:

Re: [Chicken-users] set! on unbound variable

2016-09-23 Thread Dan Leslie
Sounds like a Chicken Bug, from the docs[‎0]:> <_expression_> is evaluated, and the resulting value is stored in the location to which is bound. must be bound either in some region enclosing the set!

[Chicken-users] set! on unbound variable

2016-09-23 Thread Jinsong Liang
Hi, I have been tripped by the following mistake a few times: (let ((hello 0)) (set! helo 1)) I meant to set! on hello. However, due to a typo, I did set! on helo. This bug is extremely hard to debug to me. Is there a way to make Chicken give warning on this? Or how do you handle this