Once again, not everything is wrong with TypeScript, but this is how I have really felt as soon as I have heard about this yet another JS superset and after a quick analysis through examples.
My JavaScript book is out!
Don't miss the opportunity to upgrade your beginner or average dev skills.
16 comments:
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.
Remember there was a similar discussion around assembly. Something about real programmers program in assembly. Similarly, I will be happy when we can say dinosaurs and compilers program in JavaScript.
http://en.wikipedia.org/wiki/Real_Programmers_Don't_Use_Pascal
Straight to the point and well written! Why can't everyone else be like this?
awesomo!!! all said
So I guess you are against everything that will replace JavaScript in the long term.
Who is the one who doesn't want to change?
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 ;)
OMG, I love your blog and just discovered it half an hour or so ago. I have learned tons in a short time. How do you manage to draw in so many readers who also add educational comments? Tip of the hat to them, too. I began learning programming about 4 years ago, and have reasonable ability in BASIC, can use HTML, hate CSS but manage somehow and have a great fondness for php and am gradually becoming able to do interesting and useful things with it. JavaScript however, has been this huge black wall I have been afraid to approach. Somehow, I sensed that the world is full of half~baked, ill~advised and malformed instructional material; a dearth of useful resources for a novice to immerse themselves in and learn the language from the foundations up. So, good to find folks who can explain things in a logical manner. Keep up the good work!
Post a Comment