-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
In an of clause we write stuff like of x | y | Type. Why can't we write that in a case?
Currently Ceylon forces you to distinguish type cases from value cases using the is keyword, which very occasionally pushes you towards nastiness like this:
case (is \Itrue | \Inull | Foo) { … }Are there any really compelling reasons to not let you just write:
case (true | null | Foo) { … }Historically, I think there were some reasons, since I had speculated about a lot of different kind of case conditions, case (satisfies ... ), etc, which we still don't have. Also the syntax for value cases was different to the syntax for union types with the ,s instead of |s.
Right now, I can't really think of much.