Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Closure example #38

Closed
concavelenz opened this issue Feb 8, 2016 · 7 comments
Closed

Issue with Closure example #38

concavelenz opened this issue Feb 8, 2016 · 7 comments

Comments

@concavelenz
Copy link

Why are you using such a bad example from the Closure Compiler? You should at least specify what options you are using.

@samccone
Copy link
Owner

samccone commented Feb 8, 2016

hi @concavelenz thanks for your feedback

I am using an open source es2015 implementation of todomvc, sorry that you do not like it, but it was one of the few examples of es2015 code that is fully tested and can be compiled across all of the compilers with only a few tweaks required.

Here are the options
https://github.com/samccone/The-cost-of-transpiling-es2015-in-2016/blob/master/Makefile#L43

Thanks 👍

@samccone samccone closed this as completed Feb 8, 2016
@samccone
Copy link
Owner

samccone commented Feb 8, 2016

If you feel like the language could be better in places feel free to open a PR. ✨

@paulirish
Copy link
Contributor

There's been a few comments indicating the use of closure compiler isn't good. I'm not sure I understand the sentiment here. The use of closure compiler is quite realistic use and puts the options on equal footing. The fact that closure comes out on top, even without any annotations placed is impressive already.

@concavelenz
Copy link
Author

You misunderstand. It isn't the choose of code that is the issue here but that you simply say "Closure" like it wasn't a complex tool with lots of possible options. At the very least, you should be using the "--assume_function_wrapper" option (available with the head version of the compiler) to get the best out of "simple" mode (assuming you are using SIMPLE mode).

@samccone
Copy link
Owner

samccone commented Feb 9, 2016

tracking here #40

thanks for the pro tip @concavelenz

@concavelenz
Copy link
Author

Could I ask for the screen shot to be updated?

@samccone
Copy link
Owner

samccone commented Feb 9, 2016

I added a note last night

4cf85b2


Let me know if you think this could be made clearer -- the point of the screenshots was really not to drag anyone under the bus.. but rather just to show the default behavior of the compilers to illustrate the point that each compiler does something different under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants