mys-lang / mys

The Mys programming language - an attempt to create a statically typed Python-like language that produces fast binaries. See https://mys-lang.org for more information.
Other
132 stars 5 forks source link

Panic instead of raising error? #48

Closed eerimoq closed 3 years ago

eerimoq commented 3 years ago

Make NoneError, UnreachableError and IndexError in some places should panic instead of raising an error. No logic should be based on catching these errors. A panic will terminate the program.

This ensures that --unsafe does not change the program logic.

UnreachableError should be a panic because one don't want to list that in @raises() decorator, and no logic should be based on executing unreachable code.