fuzion
fuzion copied to clipboard
Re-visit syntax sugar for enum-like choice declarations? Replace or remove full-stop syntax.
Currently it is possible to declare a choice like:
c : choice a b.
a and b are unit features that are declared automagically.
This works well if the source code is not broken but e.g. in the language server we mostly deal with broken code and want to trigger completion suggestions when user presses dot. Now we would have to figure out if this dot is a full stop or marks a call target.
I think you meant
c : choice of a, b.
I am not happy about the syntax using a dot here. Maybe just requiring a verbose
a is
b is
c : choice a b is
should do