Comment by hunterb123
5 years ago
Are decorators JS? Answer that question and I'll respond to the rest of your comment.
We're talking in circles a bit so I'd like to drill that down first.
5 years ago
Are decorators JS? Answer that question and I'll respond to the rest of your comment.
We're talking in circles a bit so I'd like to drill that down first.
Decorators are a stage two proposal. This means that they are not yet JavaScript, but are expected to be soon.
The point of all of this is it's a JS feature, not a system written on top of JS. A few syntax changes unlocks the rest of JS instead of having to reinvent the wheel, making your own loop and conditional systems. I don't see why the semantics of it not being included yet doesn't make it JS.
When the feature isn't in all browsers and only Babel doesn't make it not JS, similar to how async functions were JS before being natively in JS engines.
You're not being genuine when you say decorators aren't JS. No one looks at Angular 2 and says "whoa that's using some foreign language mixed with JS", they say it's using a JS experimental feature.
I'll concede that it's not "JS" it's an "experimental JS feature", I'll use that in the future to avoid this pedantic debate.
> I don't see why the semantics of it not being included yet doesn't make it JS.
You don’t see why something not being included in JavaScript doesn’t make it JavaScript? Really?
> I'll concede that it's not "JS" it's an "experimental JS feature"
JSX is not an experimental JS feature. You’re trying to draw an equivalence between decorators and JSX, but they aren’t equivalent at all.
Decorators were submitted for inclusion into JavaScript. They have undergone a lot of review to determine whether they belong in JavaScript, and people agreed they did. The specification has been refined to make them suitable for inclusion into JavaScript. Everybody plans on decorators becoming part of JavaScript. Browsers will implement decorators.
JSX, on the other hand, is explicitly not proposed for inclusion into JavaScript. The second and third sentences of the JSX specification read:
> It's NOT intended to be implemented by engines or browsers. It's NOT a proposal to incorporate JSX into the ECMAScript spec itself.
The second sentence is even bolded in the specification. They wanted to be 100% clear about it.
The standards committee isn’t reviewing JSX for suitability for inclusion into JavaScript. Nobody is planning on JSX becoming part of JavaScript. No browsers are planning on implementing JSX.
These are two entirely different situations. Decorators being on the cusp of becoming JavaScript does not mean that JSX is JavaScript.
3 replies →
The reason you're going around in circles is because you keep insisting on repeating something that's not true.
Again, at the risk of repeating the truth: "Repeating it over and over again does not make it true."
There's no need to "drill down" or infinitely recurse on yourself: simply execute a "break;" and stop repeating things that aren't true, and your infinite "while" loop will terminate, and your function will finally "return;".
Has JavaScript's fuzzy concept of "truthyness" has affected your brain, and you're just as confused about the basic concept of "equality" as Brendan Eich is about gay marriage and human rights?
https://dorey.github.io/JavaScript-Equality-Table/
Figuring out whether (JavaScript == JSX) || (JavaScript != JSX) isn't as tricky as deciding why (NaN == NaN) || (NaN != NaN). And using three equal signs instead of two isn't going to change the result.
(I'm sorry this has to be repeated over and over again, but it IS objectively true that you're repeating things that aren't true over and over again, and that's not making them any more true.)
So please repeat after me: JSX is not JavaScript. That's the truth, it's always going to be true no matter how many times you repeat the opposite, and it shouldn't have to be repeated.
Please see the reply I posted to @JimDabell, I didn't answer you due to your rudeness, but my reply applies to your points as well, your wall of text was the same as his two sentences.
edit: I'll expand for you...
I'm sorry you wanted to get sucked into "is an experimental feature JS feature JS or not". That was not my intent. The entire intent was you can use JS by using the JSX extension. Instead of #for you use JS iterator functions. You can use non experimental JS features in JSX instead of conditionals or loop systems you roll yourself. Your only argument is "oh it's not included yet" okay, no shit.
Anytime someone says JSX is JS they don't mean it's currently in the standard spec, no one is arguing that, they're arguing you can use JS language features instead of a custom template system.
Anytime someone says JSX is JS, what they said means what those words mean, and what those words mean is wrong. JSX is not JS.
If you want to say something that is different than "JSX is JS" then use different words than "JSX is JS". Nobody is misunderstanding you. You're simply wrong, and insisting on saying something that's not true.
It's possible in the English Language to put together a different sentence using different words that is not incorrect, so do that, instead of saying "JSX is JS", if you want the words you say to not be wrong.
But you don't get to unilaterally redefine the meaning of the word "is", or the JavaScript language definition, and then act rude and angry and frustrated when people disagree with you and get tired of your infinite looping and mindless repetition of things that simply aren't true.
So try this: next time you feel the urge to repeat the false statement "JSX is JS", and find yourself looping infinitely picking arguments with knowledgeable people who disagree with you, instead say something completely different, that actually means what you're trying to say and is true, like "You can use JS language features instead of a custom template system", which means something totally different than "JSX is JS".
Then you won't be saying something that is wrong, and you won't feel so sad that people are misunderstanding you, and you won't get sucked into an infinite loop and keep going around in circles, because you're not simply saying what you mean, and instead inexplicably saying something that's not true instead.