On Thu, 25 Oct 2012 16:33:40 +0200, Mario Fusco <[email protected]>
wrote:
If you take Option so seriously and are on the JVM, why not fully switch
over to Scala?
Let me reply to your question with another very simple question: how many
people in this mailing list, and more in general which percentage of the
developers in the world, are allowed to choose the language they like or
that in their opinion fits better the peculiarities of the project they
are
working on? Personally I will consider myself lucky if I will be able to
drop Java7 compatibility and develop only in Java8 in let's say 3 to 5
years from when Java8 will be officially out.
Anyway it is fine for me to not have Option in Java8. It means I will
develop my own version and will use it in my projects. What I really
cannot
tolerate is a badly written version of it in the core Java libraries,
that
will stay there untouched forever only for backward compatibility
reasons.
Does java.util.Date remember you something?
My additional points:
1. The F# strategy is excellent and if I had to decide, Java would never
see lambdas. In my point of view, Java 8 could just introduce a simplified
syntax for inner classes (it was called the CICE proposal if I'm not
wrong). Given that Sun/Oracle decided differently, and I'll have anyway to
pay the extra complexity of the language, let me please enjoy the new
features for full.
2. Option is not a Scala thing, is a micro-design pattern. I could like it
or not, but being a pattern I think I shouldn't see it at all, or see in
all the languages I like.
Essentially, I agree ony the importance of backward compatibility and
that, given that Java has/had nulls, it is doomed to have them forever.
But isn't Option just adding a new possibility? I don't see how it could
break compatibility. Certainly having two different way of dealing with
things, null and Option, is not elegant, and is another reason for which I
was conservative on Java evolution. But the lack of elegance was clearly a
ticket to pay for having lambdas... So with Java 8 I want that it's
possible to write "old style" code, as well as functional code.
--
Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
http://tidalwave.it/fabrizio/blog - [email protected]
--
You received this message because you are subscribed to the Google Groups "Java
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.