DISCUSS: Should the default output language be `NO_TRANSPILE`?
See original GitHub issueIt is now possible to output ES_2017
code, and in future we would really prefer to stay more on top of the output language level.
Currently the default output language level is still ES5
to support the most possible browsers by default.
Would it now make sense to make the default NO_TRANSPILE
, so you get the same language level out as you get in unless you specify otherwise?
Note that we’re still almost certain to support new language levels as input before they are supported for output (just with a much smaller gap between). In such cases NO_TRANSPILE
wouldn’t work and we’d need to generate an error if the output language weren’t explicitly specified.
Or would we default to the highest possible? That seems dangerous, since a new release of the compiler that silently switches the output from, say, ES_2019
to ES_2020
would break projects that were unintentionally relying on the fact that the default was ES_2019
just because we hadn’t yet added support for ES_2020
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:17 (12 by maintainers)
Top GitHub Comments
@customcommander Use
--compilation_level=WHITESPACE_ONLY
for that use case.NO_TRANSPILE
is alanguage_out
flag.@christiantjl If
NO_TRANSPILE
were the default, then projects using the default would end up broken when we add new features that are understood only by the front end (checks) of the compiler and not the back end (optimizations) yet.Also, it would mean that the default output level would change a lot more frequently, likely taking people unpleasantly by surprise.