This implements v0.2.0 of the language.
There are many language features which have not yet been implemented.
These can be implemented iteratively over smaller changes (v0.2.1, v0.2.2, etc.)
Remove ?or from language, which is almost identical to ?
Build Contexts and Environments
Add simple analysis of project Python files and add these to the typing context
Check mutability of variables
Do very simple type checking (in future we should use constraint type checking)
Add desugaring of inline calls to super and inline constructor arguments
Add types to variables and functions where necessary
Check whether a type is iterable by checking that it defines an __iter()__ method
Implement null safety, with undefined representing null, or None in Python. This is done in a similar fashion to Kotlin, and is baked into the type checker. We opted to not use an Optional type solution, as this makes code slightly too verbose for our purposes
Added Tests
Most of the new functionality has been tested.
It should be noted there is a slight tendency to test mostly happy paths and not so much the bad paths.
Relevant issues
Implements #152 Implements #142 Implements #150 Implements #147 Implements #121 Implements #148
Summary
This implements
v0.2.0
of the language. There are many language features which have not yet been implemented. These can be implemented iteratively over smaller changes (v0.2.1
,v0.2.2
, etc.)?or
from language, which is almost identical to?
__iter()__
methodundefined
representingnull
, orNone
in Python. This is done in a similar fashion to Kotlin, and is baked into the type checker. We opted to not use anOptional
type solution, as this makes code slightly too verbose for our purposesAdded Tests
Most of the new functionality has been tested. It should be noted there is a slight tendency to test mostly happy paths and not so much the bad paths.