Stories
Slash Boxes
Comments

Dev.SN ♥ developers

posted by LaminatorX on Friday March 21 2014, @02:51PM   Printer-friendly
from the Now-with-all-new-exploits! dept.

Sir Garlon writes:

"Oracle released version 8 of the Java Development Kit (JDK) 8 to general availability on Wednesday, March 19, 2014. (A release candidate has been available since January 2014.) The release notes include a long list of security improvements as well as support for lambda expressions."

 
This discussion has been archived. No new comments can be posted.
Display Options Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 5, Interesting) by nukkel on Friday March 21 2014, @04:23PM

    by nukkel (168) on Friday March 21 2014, @04:23PM (#19470)

    It is said that all programming languages, as they evolve, converge to Lisp/Scheme, and ever since Python became hugely popular, it is certainly trendy these days to extend languages so as to provide functor/lambda/closure-like syntax.

    However I'm not so sure it is a good fit for Java, for the following reasons:

    • * Java methods are designed to be written in a procedural, rather than a functional style. Many, many Java programmers are not familiar will the functional style, and will do a poor job at maintaining Java code written that way. Excessive use of the new syntax thus violates the principle of least surprise.
    • * Java 8's lambda expressions provide a nice syntactic sugar, but they are not real closures: you may still only refer to (explicit or effectively) final variables or fields from the enclosing class. So their usefulness is limited: they do not increase the expression power of the language. One could argue that they merely replace one kind of non-intuitive syntax (that of the anonymous class) with another.

    Frankly, I think that if you want to do functional programming in a Java environment, a solution like Clojure is a better fit. It gives you a much more Lisp/Scheme-like language (real closures, hygienic macros, weak typing, ...) and full interop with the Java parts and dependencies of your program.

    Just my 2 cents!

    Starting Score:    1  point
    Moderation   +3  
       Insightful=1, Interesting=2, Total=3
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 1, Interesting) by Anonymous Coward on Friday March 21 2014, @05:59PM

    by Anonymous Coward on Friday March 21 2014, @05:59PM (#19489)

    I had been superficially exposed to Lisp for a long time, but never bothered with it due to its almost grammar-free nature, but Clojure got me to learn Lisp. Even if you don't end up using it as one of your main language, your effort at learning Clojure/Lisp will be rewarded - it definitely expands the way you think about how to solve problems.

    Scala is another JVM language with FP empahsis. It's to Java what C++ was to C - seemingly a good idea initially, but one thing led to another and it has been turning into an unholy monster. Ultimately, I don't trust the judgment of the guy leading its development. Doesn't help that he was a principal behind Java generics.

  • (Score: 2) by Nerdfest on Friday March 21 2014, @06:06PM

    by Nerdfest (80) on Friday March 21 2014, @06:06PM (#19494)

    I'm mainly a Java developer these days, and in general, I like the language, although they need to pick up a few features to reduce the boiler plate code that's required, although most IDE's will take care of most of it. There are places though, that absolutely scream for Lamda functions. As with most features, I think it will work out quite well as long as people don't abuse the FP aspects and use them where aren't the optimal solution for readability.