You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue discusses the next code generation. There are several problems with the current code generator.
The current AST is not standard and incomplete. As the MLscript’s syntax becomes more expressive. We should make use of most JavaScript syntax (excluding the bad parts, of course) in the generated code. The new syntax trees will be generated from Babel’s syntax tree definitions.
Pretty printing must be throughly tested, as there is many trivial indentation and precedence errors in the generated code.
Generate efficient and simple code. Now, we abuse IIFEs. For example, pattern matches and let expressions are translated into nested IIFEs, which are inefficient and unreadable.
After all, the goal is to make code generation more practical. I hope someday we can see a real world project making use of the code generator.
The text was updated successfully, but these errors were encountered:
This issue discusses the next code generation. There are several problems with the current code generator.
After all, the goal is to make code generation more practical. I hope someday we can see a real world project making use of the code generator.
The text was updated successfully, but these errors were encountered: