dyoo / WeScheme

29 stars 16 forks source link

set! not recognized #58

Closed LB-- closed 12 years ago

LB-- commented 12 years ago

set! I saw set!, which isn't supposed to be used as a bare expression. Rather, one example of its use is: (set! x 17). at: line 1, column 0, in (define x 2) (set! x 17) reference to an identifier before its definition: set! at: line 1, column 0, in

dyoo commented 12 years ago

I saw set!, which isn't supposed to be used as a bare expression. Rather, one example of its use is: (set! x 17). at: line 1, column 0, in

(define x 2) (set! x 17) reference to an identifier before its definition: set! at: line 1, column 0, in

This is a known limitation in the current version of WeScheme: it currently doesn't have support for set!, though it does have mutable boxes, so set-box!, box, unbox will work.

(define x-box (box 2))
(set-box! x-box 17)
(unbox x-box)

As soon as I can integrate the Whalesong compiler into WeScheme, set! will work again. I can't guarantee that I have time to integrate Whalesong within in a short time frame.

LB-- commented 12 years ago

Thanks, I wasn't sure if i was going crazy or not.