> On Sep 23, 2016, at 6:31 PM, Dan Leslie <[email protected]> wrote:
> 
> Sounds like a Chicken Bug,

Chicken calls this a “convenience”. Yes, a std violation but handy using a REPL.

Should be able to defeat.

> from the docs[‎0]:
> 
> > <Expression> is evaluated, and the resulting value is stored in the 
> > location to which <variable> is bound. <Variable> must be bound either in 
> > some region enclosing the set! expression or at top level. The result of 
> > the set! expression is 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
> Subject: [Chicken-users] set! on unbound variable
> 
> 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 issue?
> 
> I know probably using set! is not a good programming style. I found that in 
> some situations it is hard to avoid set!.
> 
> Thank you!
> 
> Jinsong
>    
> 
> _______________________________________________
> Chicken-users mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/chicken-users

_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to