2 ms·
In Scala Option[T] works great, as in libraries people stopped using nulls to represent optional values. And it actually works out when enough people are using
by bad_user 12y ago
In Scala Option[T] works great, as in libraries people stopped using nulls to represent optional values. And it actually works out when enough people are using it. Plus, if you're unsure about a value you receive (whether it's nullable or not), you can always assume the worst and wrap it in an Optional.