Prototypes Are Not Classes
raganwald.com
Prototypes Are Not Classes
1–10 of 46 posts
Re: Prototypes Are Not Classes
#2Re: Prototypes Are Not Classes
#3Never get why people are so excited with atomization, that necessity of decomposing everything in atomic parts...
Others are curious. What is fire? Is electricity fire? What's the smallest thing That can be on fire? How can you make something burn faster?
We make up little explanations about how knowing the answers to these questions makes us more productive world-burners, but in the end we're just curious people.
Re: Prototypes Are Not Classes
#4Re: Prototypes Are Not Classes
#5Re: Prototypes Are Not Classes
#6I guess before learning JavaScript, developers need to be sent to a Self learning camp.
I'll just show myself out...
Re: Prototypes Are Not Classes
#7Never get why people are so excited with atomization, that necessity of decomposing everything in atomic parts...
Understanding the decomposition allows you to internalize the behavior of a complex entity and thus understand and predict how it will behave in different (i.e. previously unseen) contexts.
If you avoid decomposition and instead view each entity as a one-off with its own unique behavior patterns then you are limited to memorizing the behavior on a case-by-case basis. Any extrapolation or prediction of behavior would be as effective as random guesses.
Re: Prototypes Are Not Classes
#8I guess before learning JavaScript, developers need to be sent to a Self learning camp.
Essentially, by javascript not being a very good Self.
[0] IIRC in Self the prototype is the object you copy, objects linked through parent slots are either mixins or traits.
[1] although it doesn't have a lobby, which makes the difference between traits and mixins, js's prototypes are probably closer to self's traits.
[2] that's being added in ES6, yay. But still single, boo.
Re: Prototypes Are Not Classes
#9I guess before learning JavaScript, developers need to be sent to a Self learning camp.
I'm not sure that's a good idea, because then they'd be made very sad by constructors, by prototypes being something completely different[0], by not having mixins[1], by single-inheritance, by dynamic inheritance[2], by the lack of blocks (and non-local returns), etc… Essentially, by javascript not being a very good Self. [0] IIRC in Self the prototype is the object you copy, objects linked through parent slots are e…
Re: Prototypes Are Not Classes
#10For a good counter-example, check out a lot of google's JS libs (in all their giant module goodness).