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
The old analyser module needs to go, particularly given the significant language changes that have occurred. I did start working on a sema module; I intend to pick up where I left off with that.
One pass over the AST (as was conducted by analyser) will not suffice. The minimum number of passes I think are reasonable is somewhere around 3, which is unfortunate but necessary.
Collect impl blocks and associate them with structs
Declare all variables and types in the symbol table
Attempt to associate all symbols with a value
This should allow for declarations in any order. I'm considering experimenting with bidirectional type checking, so that generics are a bit more elegant. Consider:
func cast(x $From) $To => x as $To;
func takesAnInt(x int) int => x;
// Without bidirectional type checking
takesAnInt(cast(2.5) as int);
// With bidirectional type checking
takesAnInt(cast(2.5));
The text was updated successfully, but these errors were encountered:
The old
analyser
module needs to go, particularly given the significant language changes that have occurred. I did start working on asema
module; I intend to pick up where I left off with that.One pass over the AST (as was conducted by
analyser
) will not suffice. The minimum number of passes I think are reasonable is somewhere around 3, which is unfortunate but necessary.impl
blocks and associate them withstruct
sThis should allow for declarations in any order. I'm considering experimenting with bidirectional type checking, so that generics are a bit more elegant. Consider:
The text was updated successfully, but these errors were encountered: