behind the design
Oh man, this was perfect. Thank you for making this!Also maybe link to Hiimdaisy's original, it's quite funny too.
Perfectly sums it up all in a nice way! Thanks
Classes were first.All that BS what Alan Kay was preaching about objects is not in use. They're most close to Scala Actors or event-based programming models. It's not bad, it's only our usage of classes is based on an entirely different approach proposed by Dahl in 1972, and Kay's was a sidetrack, while sounds good.Prototypical inheritance have nothing to do with real life.Human brain works on a pattern-matching algo: it's not that we need a single prototypical bird to derive the notion of birds, we need to see multiple, different kind of birds, and our brains will create a matching pattern class.Unfortunately, the findings on how the brain actually works in this regard come from the end of the 90s, a few years later than JS was conceived, and it's deeply hidden in psycho and UX books, which devs don't read.Long story short: according to the current state of science, prototypical inheritance is pure BS with no base on human thinking.It's not that you can't learn prototypical inheritance, but it's much more closer to copy-paste programming (copy stuff, modify custom parts), than how your brain thinks about objects in the real world. We create schemes every single hour. We might not organize these schemes, but we think in schemes and even put our fellow people into these schemes naturally. It's not old-fashioned thinking, it's biology.So that's why we urgently need classes: simply classes are the natural way of thinking about a huge mass of objects. It's not the objects which count, it's the classes. We can rape our minds every day to pretend that prototypical thinking is natural, we may even get succesful with this rape, or emulate classical programming, but en masse, it can't gain mainstream momentum.So JS is late with classes for 17 years, and every single day which passes without working, standardized classes in every major browser and server-side runtime is added to this debt.
Aadam, when I see a duck, I think "that's a duck" ... I don't think that's a duck extends bird implement volatile, creature
"All right, Gentlemen!"So no women are there? Explains a lot :P
Will you close the comments when people starts disagreeing with you? Why not write your self a private journal other than web logs and pretending to start a discussion. How convenient?No offence intended.
sam not really ...is jut that someone does not know a limit or the meaning of "offence".Moreover, I am tired of scam in bloggger platform and don't have time to filter by my own all comments and I don't want to let 1000 spam messages go through ... so, apologies, and please deal with it, thanks
Does seem odd to kill comments on a thread though, makes it a waste of time commenting.
I really appreciate what you post. You have a new subscriber now.
Straight to the point and well written! Why can't everyone else be like this?
awesomo!!! all said
Andrea: when you see our cat, Cirmi, you think she's a cat, not an object with 4 legs, green eyes and stripes which will likely be inherited by other similar objects once she gives births to her kitties. If you see her next to a dog, you think that there are two animals - perhaps you don't go into the mammal-line, but say they're pets, and you're certain pets are household animals, so it's pretty fine that you see them around our house, while if you'd see a fox or a wolf, you'd think this is extraordinary, and perhaps this situation needs to be sorted out.A duck is not an object; an actual duck is an object. When you think it's a duck, you refer to classes.
or I simply think about mixins that make that creature/object a duck ;)
Post a Comment