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
Add support for type inference, so walt itself can discover the type of a variable from the values it's being assigned. For safety and simplicity this can be done in a strict way, don't allowing to change the type of a variable. This is something similar to how Rust types works. In a next iteration it would be changed to create new hidden variables transparently to the user if the type is different.
Impact
Medium. The most difficult part would be the type inference, but following the AST would not be too much difficult.
Details
This would allow to write more Javascript-like code, in most cases types would only be needed to be set in the function signature.
The text was updated successfully, but these errors were encountered:
This has already been done in AssemblyScript, which compiles a variant of TypeScript to WebAssembly. Walt's syntax is very similar (if not identical) to AssemblyScript, so type inference is probably feasible.
Feature Request
Overview
Add support for type inference, so walt itself can discover the type of a variable from the values it's being assigned. For safety and simplicity this can be done in a strict way, don't allowing to change the type of a variable. This is something similar to how Rust types works. In a next iteration it would be changed to create new hidden variables transparently to the user if the type is different.
Impact
Medium. The most difficult part would be the type inference, but following the AST would not be too much difficult.
Details
This would allow to write more Javascript-like code, in most cases types would only be needed to be set in the function signature.
The text was updated successfully, but these errors were encountered: