added questions for optional type and type guard
This commit is contained in:
parent
8d09aea1f7
commit
09234a416b
@ -126,6 +126,11 @@ class Foo(EnvExperiment):
|
|||||||
* Type variable cannot occur alone in the result type, i.e. must be bound to the
|
* Type variable cannot occur alone in the result type, i.e. must be bound to the
|
||||||
input parameters.
|
input parameters.
|
||||||
|
|
||||||
|
Questions:
|
||||||
|
* Should we support things like optional type? (like the one in rust)
|
||||||
|
* Would it be better to assert on the type variable directly instead of
|
||||||
|
`type(x)` for type guards?
|
||||||
|
|
||||||
## Dynamic Dispatch
|
## Dynamic Dispatch
|
||||||
Type annotations are invariant, so subtype (derived types) cannot be used
|
Type annotations are invariant, so subtype (derived types) cannot be used
|
||||||
when the base type is expected. Example:
|
when the base type is expected. Example:
|
||||||
|
Loading…
Reference in New Issue
Block a user