TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: 6to5 – Turn ES6 code into vanilla ES5 with source maps and no runtime

48 pointsby sebastianmckover 10 years ago

9 comments

possibilisticover 10 years ago
This is really awesome, and at its core a powerful concept. After checking the diva out, a thought occurred to me: any new language revision should come with an officially supported tool from the authors to translate changes <i>backwards</i>.<p>Counter to the logic of tools like Python&#x27;s 2to3, I think the more important need is to start writing new code, not porting old code. If you can run new code on the old runtime &#x2F; interpreter &#x2F; whatever, you get all the good feels. Porting sucks. New features rock. It just seems like a far superior experience for everyone involved. If happiness is how infomemes spread, assuaging the porting woes couldn&#x27;t hurt.<p>I realize there could be concerns involving performance, changes to semantics, etc. that may make back-transliterated (transpiled?) code inherently worse. But if language designers took design of a backwards compiler into consideration when writing the new grammar and semantics, we might see smaller changes brought about in an overall faster pace of iteration.<p>Just a thought.<p>This tool is neat. :)
评论 #8426230 未加载
arcatekover 10 years ago
I think that your benchmarks are a bit off: instead of comparing 5to6 with Traceur + Runtime, you should compare 5to6 + &lt;polyfills&gt; versus Traceur + Runtime (or 5to6 vs vanilla Traceur).<p>Same, the Op&#x2F;Sec doesn&#x27;t tell us much about how much time is actually required to compile a significant codebase.<p>Anyway, I really like these projects (especially since I&#x27;m working on an ES6 library), so good luck ! Is it possible to live-compile ES6 scripts, like with Traceur + ES6-Module-Loader ?<p>Finally, I note that 5to6 doesn&#x27;t use ES6 itself (when the Traceur build process self-compile, for example).
评论 #8426753 未加载
评论 #8427219 未加载
nathanbover 10 years ago
For ignorant people like me trying to figure out what this is all about: ES6 -&gt; ECMAScript 6, ES5 -&gt; ECMAScript 5.
nailerover 10 years ago
Site mentions generator support is on the way - would love to see this.<p>At some point I could imagine building stuff purely inline in ES6 for the evergreen browsers and transpiling to ES5 for IE.
fuzzythinkerover 10 years ago
Is including generators on the roadmap? It&#x27;s #1 usage for es6 for me.
lobster_johnsonover 10 years ago
This is fantastic. Thanks! I had problems getting Traceur to work with our codebase (and was unhappy about the fact that it added about 100KB to our JS bundle), but this one just slotted right in.
YousefEDover 10 years ago
How does this compare with TypeScript? If I remember correctly they also try to stick close to the ES6 specs
aikahover 10 years ago
How does it handle module loading in the browser?
评论 #8426160 未加载
SimeVidasover 10 years ago
Why does Traceur require a runtime?