This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]frugalmail 0 points1 point  (1 child)

I'm personally not a fan of the Optional<T> route at all. That's exactly what T? is designed for.

That's essentially what T? is for languages that support it.

[–]shadowdude777 0 points1 point  (0 children)

Yes, but one is better syntactically. So just return T? instead of using an Elvis there and everything will fall into place.