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
{{ message }}
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.
Functions can only be defined at the top level of modules and have access to global variables and their function arguments.
Closures are anonymous functions that capture values of variables from their outer scope(s).
Without a more advanced jump instruction, we really have no choice but to inline all functions. Recursive functions cannot be inlined, so we will have to implement some sort of tail recursion or something for those (or disallow recursion completely).
Low priority until MVP.
Disallow code outside of a function, make main() the entry point
Automatically declaring stdin/stdout may not be viable anymore because that runs code and allocates memory so we may have to define some std functions to create them just like in Rust
Function type definitions in grammar
Store literals in a temporary memory location when passing to non-built-in functions
Store functions in an IR that is independent of the position of each of the function's arguments
Use TypeIds to make sure the types used in that function cannot be accidentally overridden by later declarations
If Foo is declared in the same module as a function and then another Foo is declared in another module, the first Foo should still be used in the function no matter what context the function is called in
Make sure functions can be declared in variables
Error when wrong number of arguments is applied to a method
Functions can be assigned to variables with type fn(foo) -> ReturnType like Rust
The text was updated successfully, but these errors were encountered:
Functions can only be defined at the top level of modules and have access to global variables and their function arguments.
Closures are anonymous functions that capture values of variables from their outer scope(s).
Without a more advanced jump instruction, we really have no choice but to inline all functions. Recursive functions cannot be inlined, so we will have to implement some sort of tail recursion or something for those (or disallow recursion completely).
Low priority until MVP.
TypeId
s to make sure the types used in that function cannot be accidentally overridden by later declarationsfn(foo) -> ReturnType
like RustThe text was updated successfully, but these errors were encountered: