In Mythryl unit becomes Void. The value syntax is unchanged: ()
No! This is a regression into darkness! Unit should stay unit!
According to type theorists: Unit is the data type inhabited with exactly one value (the zero-tuple). That's why it's called "unit". Void is the data type not inhabited with any values. Therefore, a function that typechecks to return type Void never terminates, because there is no value it could return. (The use of "void" in mainstream programming languages corresponds to "unit" in academic settings).
Also, if our notion of "function" is an expression with exactly one argument and one return value (like in lambda calculus), then tuples come in handy as function arguments. Especially the zero-tuple, for functions with side effects that need no input data. Like...
exit ()
And that syntax is quite familiar. I understand Mythryl still uses this syntax... but don't conflate void and unit.
No! This is a regression into darkness! Unit should stay unit!
According to type theorists: Unit is the data type inhabited with exactly one value (the zero-tuple). That's why it's called "unit". Void is the data type not inhabited with any values. Therefore, a function that typechecks to return type Void never terminates, because there is no value it could return. (The use of "void" in mainstream programming languages corresponds to "unit" in academic settings).
Also, if our notion of "function" is an expression with exactly one argument and one return value (like in lambda calculus), then tuples come in handy as function arguments. Especially the zero-tuple, for functions with side effects that need no input data. Like...
And that syntax is quite familiar. I understand Mythryl still uses this syntax... but don't conflate void and unit.