13 Matching Annotations
  1. Sep 2021
    1. As a bonus, you have the option of choosing a particular version of JavaScript to target when compiling, so you can use updated JavaScript features, but still, maintain legacy browser support (if you're into that sort of thing)!
    1. Code that is needed to create the output and the output itself is hard to read because of all the workarounds we have to use, especially around shadowed variables and control flow
  2. Nov 2020
    1. One important other option is using another programming language as your IR! If you can compile (or perhaps more accurately transpile) your language into C, then you can leverage gcc (or clang, etc) into compiling that all the way down into machine code.
  3. Oct 2020
    1. JSX has the advantage of being fast, but the disadvantage that it needs to be preprocessed before working. By using template string virtual-html, we can have it work out of the box, and optimize it by writing a browserify transform. Best of both!

      See also: https://github.com/choojs/nanohtml#static-optimizations

      (this person later recommends this library)

    1. This is valid javascript! Or harmony or es6 or whatever, but importantly, it's not happening outside the js environment. This also allows us to use our standard tooling: the traceur compiler knows how to turn jsx`<div>Hello</div>`; into the equivalent browser compatible es3, and hence we can use anything the traceur compile accepts!
    1. A simple Vue project can be run directly from a browser with no need of transpilation. This allows Vue to be easily dropped into a project the way jQuery is.While this is also technically possible with React, typical React code leans more heavily on JSX and on ES6 features like classes and non-mutating array methods.
  4. Sep 2020
    1. but TS compiler is really slow. If you are feeling adventurous and want faster compilation times you can try the SWC compiler to transpile your Svelte TS scripts
    1. Snowpack uses Babel for transpiling TS to JS, because Babel is much faster than TS compiler. The reason for that is that Babel only strips out the types and does not do any type checking.