Skip to content

Latest commit

 

History

History
43 lines (40 loc) · 2.02 KB

README.md

File metadata and controls

43 lines (40 loc) · 2.02 KB

meta-loader

A webpack loader to achieve transpile-time metaprogramming with pure JavaScript

Playground

TODO

  • Seamless bridge to TypeScript
    • .d.ts generation
  • operator overloading, syntactic sugar, short-hand, intentional, declarative programming (much like a DSL?)
    • safe-programming
      • static libraries
        • number-safe
        • markdown or any other markup languages as syntactic sugar - Some of them need constexpr - support runtime + compile time
          • Math symbols
          • Calculated graphics
          • ORM
          • JSX
        • compile-time wrapper
        • transpile-time types
        • matrixA + matrixB = matrixC
      • polyfills
      • transpile-time code elimination
        • Build variant
  • As a test-case like constraint in code
    • Much like an assertion
    • However, different to test cases, test cases simulates user action and check the outcomes, constraints statically check if program flow is robust
  • transpile-time evaluation
  • reduce overhead (inline functions, compile-time wrapper, etc...)
  • Never try to do spaghetti code pattern
    • treat .metajs and normal .js separately
    • ultimate goal is to move all .js code to .metajs

Reference