logoalt Hacker News

attila-lendvai • yesterday at 9:00 PM • 1 reply • view on HN

you lost me at the receiver selector order.


Replies

Jtsummers • yesterday at 9:26 PM

It's a common way to implement OO in Lisp-y languages, and it fits if you're taking Smalltalk as an inspiration. SICP has an example in chapter 3 (IIRC) of doing the same, but the selector had to be quoted as in:

  (my-account 'balance)
  (my-account 'withdraw 10)
➕ show 1 reply