Lexical scoping for slot-names #12

Open
opened 2021-06-10 17:06:33 +00:00 by kwannoel · 0 comments
kwannoel commented 2021-06-10 17:06:33 +00:00 (Migrated from github.com)

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]))
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])) ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mighty-gerbils/gerbil-poo#12
No description provided.