We're referring to the original posts problem where using = inside a function can redefine global variables:
arc> (= data* '(green red)) arc> (def my-fn () (= data* nil)) #<procedure: my-fn> arc> (my-fn) nil arc> data* nil
assume you place this in html.arc
(= data* '(blue red)) ; (add-color 'purple) (def add-color (color) (push color data*))
(= data* '(green red)) ; (add-apple 'golden) (def add-apple (color) (push color data*))
(load "lib/apples.arc") (load "lib/html.arc")
> (string (car data*) " has gone brown") "blue has gone brown"
why is there no warning or error on loading my lib? That's pretty bad IMO.
-----