Hacker News new | ask | show | jobs
by loup-vaillant 4966 days ago
> if you understand an object-oriented and a functional language then you understand two quite different ways of encapsulating state - as objects and as closures. that leads you to thinking about state as something more general than either, which gives you a higher level view of the problems you are tackling.

Yet, it may not be general enough. With one data point, one doesn't generalize. With two, one tends to think of a spectrum. With three… Now it gets interesting.

For instance, encapsulating state: you had objects and closures. They look pretty different, until you learn of Functional Reactive Programming, where state is handled in a much more timeless fashion.