Hacker News new | ask | show | jobs
by dangrover 6416 days ago
That's my point. You don't need to have a separate special construct for objects, or any kind of support for them, when you have first-class functions.

As for state information, you could just put a 'let' inside there with your variables, and call mutators on them from inside the "object"'s functions.

Hmm, I think all these Scheme-centric classes I've taken have warped my mind. I should seek therapy.

1 comments

> when you have first-class functions.

This isn't enough without the ability to close over the lexical environment. See Python pre 3.0, without the dictionary/list "hacks".