タグ

node.jsとES6に関するOooのブックマーク (2)

  • An Update on ES6 Modules in Node.js

    A few months ago I wrote an article describing the various differences that exist between Node.js CommonJS modules and the new ES6 Module system; and described a number of challenges inherent with implementing the new model in Node.js core. Here, I want to provide an update on how things are progressing. Knowing when you know what you need to knowIf you haven’t done so already, before progressing

  • node.js/v8のgeneratorsのパフォーマンスについてちょっと調べた

    node.js/v8のgeneratorsのパフォーマンスについてちょっと調べた 初めに断っておきますが、今回の調査は、node v0.11.5 (Linux)で試したもので、他の環境では異なるかもしれません。さらに、今後のバージョンアップによっては全く異なる結果となることも十分ありえます。ご注意を。 ES6にgeneratorsが入るとのことで、JavaScriptでcontinuationが使えないかなぁと思っていた自分としては、興味を持ちました。 ちなみに、generator, coroutine, continuationの順に記述力が上がるそうです。こちらが参考になるかもしれません。 さて、generatorsの説明は他に任せるとして、いきなりコードです。 function* es6_generator() { yield 1; yield 2; yield 3; yield 4

  • 1