Closed
Description
I'd like to propose a policy that we require any use of un-aliased Any
to be accompanied by a comment described why the Any
is needed. Using Any
is always a bit of a red flag to me (although of course often needed), and it's often not overly obvious why Any
is required. We've started to tackle this problem in the past by adding few aliases to better document the use of Any
, which was a great start. But sometimes it's also not clear whether Any
is really required or whether it's just a placeholder. And that situation also changes over time as the type system gains new features.
Of course, this only applies to new or changed annotations. I don't propose that we need to go through all existing Any
s.