Hacker News new | ask | show | jobs
by ZenPsycho 5126 days ago
@olalonde that's a bit of a cop out, of course I've read that article. That is why I'm baffled by the assertion that prototypes are more primitive than classes. It doesn't add up with the definitions of what amounts to being high level and low level. If you have something more specific to say I suggest you say it, but it's pretty lame to just wave your hands at a wikipedia article and tell me to figure out something that you've obviously got wrong, from my point of view.
2 comments

Prototypes are a primitive data type of Javascript (a basic building block). Classes are not offered natively and have to be constructed with lower level building blocks such as prototypes. This is why classes are said to be higher level than prototypes in Javascript. Does that help?
Do you think that is the sense of the word "Primitive" intended by the author of JSX? In that sense of the word, what does "More" primitive or "Too primitive" mean? I would have thought something was either a primitive or it wasn't- not a sliding scale.
I find it hilarious that olalonde appears to be turning your condescending use of socratic irony back on you by treating you as the "ignorant student" that you pretend to be, and then not only do you not pick up on it, you actually get offended! Brilliant.
There was no question that he was asking me to answer. He just told me that I was confused and pointed me at an article. He didn't say what he thought I was confused about. There was no obvious conclusion he was attempting to lead me to. There was no new evidence he was presenting. It's probably an mistake to read offense into text. There is no way for you to know whether I was offended or not. In this case I was not offended, I was pointing out that his reply was devoid of content, and lacking in effort. Likewise if you want to read condescension into my text, that's up to you, but has nothing to do with anything I wrote.
Your arguments all tend to make sense when using the English common usage of the word primitive, because I believe that JS prototypes are possibly more advanced than Java classes.

However, speaking solely about the language Javascript, I think it's also fairly clear that in Javascript a prototype is a language primitive that you would use to build a Java-like class construct. Therefore in this context, according to the programming term primitive, prototypes are clearly "more primitive".

It doesn't matter what the Javascript interpreters are doing behind the scenes, because all we care about is Javascript as a language, and what building blocks are available there.

Your use of the word primitive does not seem to logically match the definition of the word provided in the Wikipedia article (admittedly not the best reference for programming concepts), which is why I believe the link was entirely warranted.

And just as a side note, it is entirely possible to be condescending without consciously intending to be.

As a side note, when a human communicates something there is an intent and an interpretation. If the two don't match up, do you defer to the intent, or the interpretation as the correct meaning?