News for hackers. Stuff that matters.
Re:A Visual Guide to React Mental Models: UseState, UseEffec... by jayd16 on Friday May 29, 2020 @01:21PM (#23352767)
I can see why objects and closures are reducible to each other. As a Java dev who's written listener objects, closures seem like simple sugar to me. They hold private state or references to state. Functions can be passed references to mutable data so they are equivalent as well.

However, there is the concept of a pure function (one that is unaffected by and causes no side effects) which I think can be argued is fundamentally different.

There are no comments on this comment yet.