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
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:
> On Sep 23, 2016, at 6:31 PM, Dan Leslie 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]:
>
> > is evaluated, and the resulting value is stored in the
>
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!
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