JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
85 stars 3 forks source link

Add operator to access (unsafe) Python code #177

Closed JSAbrahams closed 4 years ago

JSAbrahams commented 4 years ago

Current Issue

There is no safe way to access Python code.

High-level description of the feature

Add ! operator, similarly to how Kotlin accesses unsafe Java code, to access Python code. This code will then not be type-checked, and may throw any type of Exception or by any value. This means that expressions within this operator will have to be casted.

from python_code impot python_library
# throws value error if expression cannot be casted to an integer
def a: Int = python_library.function()!

Description of potential implementation

JSAbrahams commented 4 years ago

Duplicate of #160