A webpack loader to achieve transpile-time metaprogramming with pure JavaScript
- 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
0.1 + 0.2
should be0.3
, not0.30000000000000004
- 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
- number-safe
- polyfills
- transpile-time code elimination
- Build variant
- static libraries
- safe-programming
- 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...)
- erase functions / lambdas / closures
- refer to the optimizations the V8 engine does
- Never try to do spaghetti code pattern
- treat
.metajs
and normal.js
separately - ultimate goal is to move all
.js
code to.metajs
- treat