We can circumvent much of the type system by simply calling unsafe Python code.
High-level description of the feature
Add an operator that signifies we're calling Python code.
Such code may, to left of the operator, be considered unsafe.
This means that we may get runtime errors caused by Python.
Everything right of the operator should be (type) safe "Mamba" code.
i.e.
# unsafe function presumably returns an integer
def a: Int! := unsafe_function(1, 4)!
# a now has type int!, meaning that we assume it has type int, but this cannot be guaranteed
print(a)
I would suggest using the ! token, similar to Kotlin, which also uses this token to signal calling unsafe Java code.
Current Issue
We can circumvent much of the type system by simply calling unsafe Python code.
High-level description of the feature
Add an operator that signifies we're calling Python code. Such code may, to left of the operator, be considered unsafe. This means that we may get runtime errors caused by Python.
Everything right of the operator should be (type) safe "Mamba" code. i.e.
I would suggest using the
!
token, similar to Kotlin, which also uses this token to signal calling unsafe Java code.Description of potential implementation