-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type Aliases #1349
Comments
In the near future we will try to extend the current type system
This will be enough to have type aliases. However, the unicode problem does not end here. We will (probably) still have constructors that use unicode characters, such as
however That being said, I think (and we will discuss it more thoroughly when extending the stdlib) that we are commited to using unicode extensively and thus we will develop with the assumption that the user should be able and comfortable with unicode. |
I would worry that the syntax of Nat : Type;
Nat ≔ ℕ; would give off the wrong impression. Namely that types are values, and thus functions can be used in the same way as the rest of the language in which it can't. |
We think that going with the long-term syntax, even though we will not support full dependent types soon, is the best option. |
A lot of MiniJuvix syntax allows Unicode and non Unicode versions, for example
which is nice, as the user may not be writing from an environment which can easily input Unicode symbols.
however, the same could not be said of types. So in the stdlib there is
ℕ
, but noNat
.It would be nice if there could exist such type aliases.
Since types are defined with
inductive
, which is a very specific term, I propose another keywordHowever, this has the downside of needing more keywords, and I suspect if there are sugar for records we'd end up with
inductive
,alias
, andrecord
all being keywords, potentially breaking user code when they are added in.Ideally we could just do all these with a generic word like
type
instead.The text was updated successfully, but these errors were encountered: