added explanation for substitution
This commit is contained in:
parent
09234a416b
commit
c84d29f09b
|
@ -18,7 +18,7 @@ for simplicity reasons:
|
||||||
* AugAssign, `a += b` etc.
|
* AugAssign, `a += b` etc.
|
||||||
* `with`, `try except`, etc.
|
* `with`, `try except`, etc.
|
||||||
* const indexing with tuple.
|
* const indexing with tuple.
|
||||||
* method override check modulo variable renaming.
|
* method override check modulo type variable renaming.
|
||||||
* more complicated type guard
|
* more complicated type guard
|
||||||
|
|
||||||
## Running Example
|
## Running Example
|
||||||
|
@ -122,6 +122,10 @@ conditions:
|
||||||
allowed.
|
allowed.
|
||||||
|
|
||||||
### Substitution
|
### Substitution
|
||||||
|
> Actually this scheme is to simplify type inference... as we think that
|
||||||
|
> standard type inference which solves equations is a bit hard to reason about,
|
||||||
|
> and hard to add subtyping into it.
|
||||||
|
|
||||||
The crucial constraint and assumption in our system is that, every
|
The crucial constraint and assumption in our system is that, every
|
||||||
(sub-)expressions must have their types fully determined, and cannot depend on
|
(sub-)expressions must have their types fully determined, and cannot depend on
|
||||||
statements/expressions after them. Hence, in a function call, every arguments
|
statements/expressions after them. Hence, in a function call, every arguments
|
||||||
|
|
Loading…
Reference in New Issue