3 ms·
I'd add also that Javascript proto inheritance is more about composition than type checking, since `instanceof` has its frames problem [1]. As a result, I'm in
by pfraze 14y ago
I'd add also that Javascript proto inheritance is more about composition than type checking, since `instanceof` has its frames problem [1].
As a result, I'm increasingly inclined to do data-structure objects and composable functions, which seems similar to Go's approach.
1 http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/ http://perfectionkills.com/instanceof-considered-harmful-or-...