munificent / vigil

Vigil, the eternal morally vigilant programming language
2.9k stars 61 forks source link

Feature Request : Enforced Data Type Safety #30

Open Nach0z opened 7 years ago

Nach0z commented 7 years ago

I've had many other developers call upon my work with, for example, doubles where there should be ints, and vice versa. I'd like to see an enforced type safety mechanism, possibly boxed data types, to prevent this. Integers, for example, would become... VigilInts. Any section of code that attempts to coerce a data type is WRONG and must be punished. Casting is acceptable as it allows the caller to acknowledge the risks, but type coercion is unacceptable. Eternal VigilInts.