On Friday, 15 November 2013 at 22:39:40 UTC, Jacek Furmankiewicz
wrote:
Many other languages are starting to frown on returning null
values from methods (due to NullPointerException risks, etc)
and wrapping them instead in an OptionalT like in
Scala:
On Saturday, 16 November 2013 at 05:04:42 UTC, Jonathan M Davis
wrote:
I really don't understand this. OptionalT is one of the most
useless ideas
that I've ever seen in Java. Just use null. It's built into the
language. It
works just fine. And wrapping it in a class isn't going to make
it go
On 2013-11-16 05:04:20 +, Jonathan M Davis said:
I really don't understand this. OptionalT is one of the most useless ideas
that I've ever seen in Java. Just use null.
Optional specifies explicitly that value can be absent and forces
client to check before using the value.
Also, if
On Sat, 2013-11-16 at 00:04 -0500, Jonathan M Davis wrote:
[…]
I really don't understand this. OptionalT is one of the most useless ideas
that I've ever seen in Java. Just use null. It's built into the language. It
works just fine. And wrapping it in a class isn't going to make it go away.
On 11/16/13 7:41 AM, Max Klyga wrote:
On 2013-11-16 05:04:20 +, Jonathan M Davis said:
I really don't understand this. OptionalT is one of the most useless
ideas
that I've ever seen in Java. Just use null.
Optional specifies explicitly that value can be absent and forces client
to check
On Saturday, November 16, 2013 11:18:38 Meta wrote:
On Saturday, 16 November 2013 at 05:04:42 UTC, Jonathan M Davis
wrote:
I really don't understand this. OptionalT is one of the most
useless ideas
that I've ever seen in Java. Just use null. It's built into the
language. It
works
On Saturday, 16 November 2013 at 23:34:55 UTC, Jonathan M Davis
wrote:
If you want to use the type system to try and protect against
dereferencing
null, then having wrapper which guarantees that the object
_isn't_ null makes
a lot more sense, particularly when just because you used
OptionalT
Many other languages are starting to frown on returning null
values from methods (due to NullPointerException risks, etc) and
wrapping them instead in an OptionalT like in
Scala:
http://blog.danielwellman.com/2008/03/using-scalas-op.html
Google Guava for Java: (now rolled into the base JDK
On Friday, 15 November 2013 at 22:39:40 UTC, Jacek Furmankiewicz
wrote:
Many other languages are starting to frown on returning null
values from methods (due to NullPointerException risks, etc)
and wrapping them instead in an OptionalT like in
Scala:
Thanks! std.typecons definitely looks like something I need to
dig into.
On Friday, 15 November 2013 at 22:41:40 UTC, Brad Anderson wrote:
On Friday, 15 November 2013 at 22:39:40 UTC, Jacek
Furmankiewicz wrote:
Many other languages are starting to frown on returning null
values from methods (due to NullPointerException risks, etc)
and wrapping them instead in an
On Fri, 15 Nov 2013 23:41:38 +0100, Brad Anderson wrote:
On Friday, 15 November 2013 at 22:39:40 UTC, Jacek Furmankiewicz wrote:
Many other languages are starting to frown on returning null values
from methods (due to NullPointerException risks, etc)
and wrapping them instead in an OptionalT
Justin Whear:
No, Nullable adds a potential null state to value types, e.g.
it allows you to null an int.
In std.typecons there is another version of Nullable, that uses a
state as null. So you can use it as nullable class reference.
Is that good enough for the OP?
Bye,
bearophile
On Friday, November 15, 2013 23:39:38 Jacek Furmankiewicz wrote:
Many other languages are starting to frown on returning null
values from methods (due to NullPointerException risks, etc) and
wrapping them instead in an OptionalT like in
Scala:
14 matches
Mail list logo