#What do you prefer?

1 messages · Page 1 of 1 (latest)

ivory ospreyBOT
#

<@&987246399047479336> please have a look, thanks.

tawny ermine
#

those two arent doing the same

#

also, Optional is meant to be used as return type by methods that want to indicate absence of a result

#

any other use of Optional is technically abuse

#

so what ur likely trying to do here is unintended use of the class

#

go for whatever is more readable, that's the number one goal 🙂

austere prairie
#

As Zabuzard pointed out those don't do the same, isPresent would be a closer match.

manic locust
#

And if you're explicitly wanting an empty Optional, ask for it with Optional.empty()

static marlin
#

which do YOU prefer?

#

you should look into what each one is doing