On Tue, Apr 26, 2022 at 5:11 PM Kevin Bourrillion <[email protected]> wrote:
Nice question! I thought about it a little bit and this is my own first > take. I think *most* of the advice would be cross-cutting across param > types, return types, field types, etc.: > > If > 1. I don't want null to be included as a value > 2. I'm definitely not abusing some value as a fake "pseudo-null" sentinel > 3. (for a value I'm declaring) I'm willing to take care that it gets > initialized properly > 4. I'm properly chastened about racy access > For a field type, or especially for the type argument of a collection (cpt type of an array), I might entertain *some* extent of #2 "abuse", with great caution. -- Kevin Bourrillion | Java Librarian | Google, Inc. | [email protected]
