The reason this is so difficult is because the typing system is being misused by Required
and NotRequired
(and Final
and a few others). Those belong to the variable being annotated, not the type itself. It doesn’t make sense for this to be part of the type hierarchy. This is part of what my suggestion here was supposed to solve. So the syntax would instead be int @ Required() @ Something()
and you couldn’t nest those annotations inside of the type system (since they don’t belong there).