I generally prefer using primitives where possible, and even more in return
types (what does a returned null mean?). Using primitives is in general
easier for client applicarions and provide more clear semantics.

I really think that avoiding nulls [1] is an extremely helpful practice and
we should apply it in our public interfaces, so I prefer using primitives
and avoid using nullable objects.

I.

[1]
https://code.google.com/p/guava-libraries/wiki/UsingAndAvoidingNullExplained
El 09/07/2014 21:28, "ssiv...@gmail.com" <ssiv...@gmail.com> escribió:

> and... there is a such thing as " Three-valued logic" which can be
> handful some cases, so I think API should care about semantics...
>
> On 07/09/2014 07:59 PM, Jeremy Daggett wrote:
>
>> No particular reason, just for consistency. ;)
>>
>> On 7/9/14, 9:40 AM, "Andrew Phillips" <aphill...@qrmedia.com> wrote:
>>
>>  We need the APIs to be consistent.
>>>>
>>> Any particular technical reason for this? Personally, I would be
>>> tempted to say "boolean" when it can't be null, and @Nullable Boolean
>>> otherwise, but that's just a somewhat context-free style preference.
>>>
>>> ap
>>>
>>
> --
> Thanks,
> Serj
>
>

Reply via email to