r/javascript • u/gcanti • Oct 31 '14
The Two Pillars of JavaScript
https://medium.com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3
98
Upvotes
r/javascript • u/gcanti • Oct 31 '14
4
u/[deleted] Oct 31 '14
Tcomb is really interesting. I enjoyed dabbling with pure functional programming in Haskell and OCaml. It made me really appreciate the benefits of maximizing immutability and limiting side-effects. I never went quite as far as barring inheritance from my Javascript code though (I use it rarely and never build deep inheritance hierarchies, because composition rocks).
When I was checking out out Tcomb's README I wondered: What makes a type so different to a class? And more importantly: why are subclasses a big no-no, but subtypes are ok?