gerbil-poo icon indicating copy to clipboard operation
gerbil-poo copied to clipboard

Lexical scoping for slot-names

Open kwannoel opened this issue 3 years ago • 0 comments

Failing test: See https://github.com/fare/gerbil-poo/compare/noel/slot-name-bug?expand=1

This will recursively evaluate the slot x to itself. Hence we will be stuck trying to define o.

Workaround - use the lexical scoping pattern mentioned in poo.md:

(let ((x 1) (y 2))
  (.def point (x) (y))
  (assert-equal! (map (cut .ref point <>) '(x y)) [1 2]))

kwannoel avatar Jun 10 '21 17:06 kwannoel