facebook / jsx

The JSX specification is a XML-like syntax extension to ECMAScript.
http://facebook.github.io/jsx/
1.96k stars 133 forks source link

Clear up terminology around tags and elements #36

Closed hzr closed 9 years ago

hzr commented 9 years ago

Hey.

I know that JSX is not XML, but since it's inspired, it makes sense to use the same terminology as far as possible. There is no such thing as an "opening element" or a "closing element". There are "start tags" and "end tags" that delimit elements. There are also some wording fixes, and I moved the "JSX Elements" section up before tags and attributes in AST.md.

RReverser commented 9 years ago

It's not just about terminology - those types are the AST types that all the JSX transpilers and plugins are already built on top of, so any change to those breaks backward compatibility and thus can't be accepted. See Philosophy of ESTree for rules that this derived spec follows, too.

Wording changes are fine as long as they don't impact actual types of interfaces.

hzr commented 9 years ago

It's not just about terminology - those types are the AST types that all the JSX transpilers and plugins are already built on top of, so any change to those breaks backward compatibility

I realize that this will break backwards compat, but I don't know how big the impact will be. You're saying it's a lot? I guess it's not feasible in that case, but it sure bugs me. :)

sebmck commented 9 years ago

Literally any transforms that touch JSX AST nodes are going to do something with JSXOpeningElement and JSXClosingElement.