News for hackers. Stuff that matters.
Re:JSX is no longer my friend by jabagawee on Wednesday March 16, 2016 @12:51AM (#11295092)
I'd like to learn enough to understand the statement "JSX is just a JS primary," and I can't find out what a "$lang primary" is in PLT. Can you point out some resources for me to figure this out?
Re:JSX is no longer my friend by couchand on Wednesday March 16, 2016 @08:30AM (#11296736)
The full name is primary expression. The meat of it is that a primary is usually just a literal value, identifier, or something in parentheses, but it varies based on the particular language.

For a deep dive you'll want to read resources about parsing. To name one article that came up recently on HN, take a look at "Why Parsing Tools are Hard" [0].

[0]: http://blog.reverberate.org/2013/09/ll-and-lr-in-context-why...

Re:JSX is no longer my friend by bottled_poe on Wednesday March 16, 2016 @06:40AM (#11296272)
The previous comment is trying to sound smart by using obscure terminology. I would guess they mean to say that JSX is a translated subset of JS?
Re:JSX is no longer my friend by couchand on Wednesday March 16, 2016 @08:31AM (#11296741)
Thanks for your generosity. This is what I was referring to: JSX extends the PrimaryExpression in the ECMAScript 6th Edition (ECMA-262) grammar.

Please take a look at the draft JSX spec [0] for details.

[0]: https://github.com/facebook/jsx