To create a new enum
, the syntax is
enum Some {
...
}
But to create a new type
, the syntax requires a =
:
type Some = {
...
}
I wonder why this =
is needed?
I think it confuses type and value, and other languages are not like this.
For example, in C++, creating a struct
doesn't need a =
.
Top comments (0)