Conversation
which may be useful for vanilla JavaScript environments such as JSFL, MongoDB, spidermonkey, or rhino
|
Thank you for the pull request. This might be the wrong time to discuss how we should fix the issue, but I am wondering if adding IMO, ideally we should never have implemented Can we still fix the issue while maintaining backwards compatibility? |
|
This fix won't break backward-compatibility and default compiler behavior. The resulting code behavior won't change unless you pass "--executable raw". I listed all JavaScript environements I know: JSX already supported
JSX doesn't supported yet.
"--executable raw" can cover all unsupported environments. But some case, it is not best. If there is callback functions (Chrome Apps, Web Worker), "--executable web" like options are best. And if there is some entry point function (like some game engine), If I can use native syntax, it's more easy to understand. static function main(argv: string[]) : void
{ } = "main"But I think "--executable raw" is a good start to support a new environment. And "Always starts from _Main.main function" is a good common sense for all JSX programmers. |
|
@gfx |
May be useful for vanilla JavaScript environments
such as JSFL, MongoDB, spidermonkey, or rhino
see https://twitter.com/shibukawa/status/375554447960576000 for the request