Hi,
IMHO,boolean isEmpty() would be a good complement to the existing
empty() method.
$.02, Roger
On 4/24/2017 1:15 PM, Anthony Vanelverdinghe wrote:
Hi Peter
I'd say no: it's merely the negation of an existing method, and given
that the bar for adding methods to Optional is set very high
Hi Peter
I'd say no: it's merely the negation of an existing method, and given
that the bar for adding methods to Optional is set very high (see e.g.
[1] and [2]), I don't see how this one would meet it.
Moreover, I don't see any issues with simply writing:
return !cf.findModule(target).
> On 22 Apr 2017, at 11:40, Peter Levart wrote:
>return cf.findModule(target).isEmpty();
>
> What do you think? Would this pull its weight?
If I had a nickel for each time I started typing .isEm.., I'd have a
respectable nickel collection. Big +1 from me.
Sander
On 24.04.2017 10:26, Andrew Dinn wrote:
Ah, bike-shedding!
Personally, I much prefer isAbsent() to isNotPresent(), presence and
absence being a historically well-sanctioned English language pairing.
[n.b. I'll grant that my preference for C18th literature over Comp Sci
argot might have swayed
On 22/04/17 14:31, Jonathan Bluett-Duncan wrote:
> Your reasoning has personally convinced me that a method like `isEmpty()`
> would pull its weight. However, at the risk of bikeshedding, I think it
> should be named differently, as `isEmpty()` immediately makes me think that
> `findModule()` retur
Hi Peter,
Your reasoning has personally convinced me that a method like `isEmpty()`
would pull its weight. However, at the risk of bikeshedding, I think it
should be named differently, as `isEmpty()` immediately makes me think that
`findModule()` returns a List, which I'd easily find confusing.
H