Open dahlia opened 7 years ago
In order to disambiguate annotations when multiple consumers (i.e. targets, runtimes) interpret them, we can make them exclusively allowed to have multiple keyword arguments or a single argument, not both e.g.:
@nullary-annotation // allowed 🙆🏻
type a = foo;
@unary-annotation("arg") // allowed 🙆🏻
type b = foo;
@single-keyword-annotation(x = "arg") // allowed 🙆🏻; keyword syntax is arbitrary for example
type c = foo;
@multiple-keywords-annotation(x = "arg1", y = "arg2") // allowed 🙆🏻
type d = foo;
@n-ary-annotation("arg1", "arg2") // disallowed 🙅🏻♂️
type e = foo;
we can make them exclusively allowed to have multiple keyword arguments or a single argument, not both
Or rather simply we can make them allowed to have only keywords, not positional arguments. Of course this approach need to break backward compatibility, which is less important for now.
The current syntax of annotations is very limited:
In order to make it usable for production (e.g. #130), make annotations richer through addition of the following features:
"foo"
123
(#267)uuid