3 ms·
> but it forces you to make a strict definition on how the set of functions will behave This would be true if JavaScript had static dispatch, but since it does
by devjab 3y ago
> but it forces you to make a strict definition on how the set of functions will behave
This would be true if JavaScript had static dispatch, but since it doesn't, everything you do with your class is mutable all the way up the prototype object chain. One of the reasons this is harder to maintain, is because the "strictness" you think you build into your code isn't actually there unless everyone who works on your code after you follows the same rules you did. I'm sure we'd like to live in that world, but I doubt we will.