Remix.run Logo
deepsun 3 hours ago

> If there's anything that is not an object, it's a function!

Why, functions have state -- their closure.

endgame 3 hours ago | parent | next [-]

Ancient wisdom: closures are a poor man's objects; objects are a poor man's closures.

https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/...

knome 3 hours ago | parent | prev [-]

closures and objects with a single invoke() method have been considered equivalent in many views for some time.

deepsun an hour ago | parent [-]

Exactly, that's why I disagree with parent's comment:

> If there's anything that is not an object, it's a function!