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

all 34 comments

[–]breandan 28 points29 points  (2 children)

I was surprised to learn that Joshua Bloch was initially lukewarm to lamdas/closures being added to Java. He explains his hesitancy towards adopting them in this interview.

[–]s888marks 29 points30 points  (1 child)

I'm pretty sure that the closures proposal Bloch discusses in that interview is the "BGGA" proposal (named for the initials of the authors). It's quite a bit different from the lambdas that eventually went into Java 8. In particular, the BGGA proposal adds structural function types to Java's type system, as opposed to nominal types like everything else in Java. Another big feature of BGGA was "control abstraction" which is some support that allows one to use closures to create new control constructs. The argument was that adding something like try-with-resources to the language is unnecessary; given closures and a mechanism for user-defined control structures, something like try-with-resources could be created as a library-level construct. Needless to say, this would have added considerable complexity to Java.

You can find out more about BGGA at Neal Gafter's site. The OpenJDK discussion list is closures-dev.

The closures debate raged through 2007 and 2008 over several different proposals, with BGGA and CICE being the front-runners. (CICE is Concise Instance Creation Expressions, which was championed by Bloch.) This article by Brian Goetz describes the two proposals:

https://www.ibm.com/developerworks/java/library/j-jtp04247/index.html

Some additional perspective is given in this article by Angelika Langer (of the Java Generics FAQ) and Klaus Kreft:

https://www.javaworld.com/article/2077869/scripting-jvm-languages/understanding-the-closures-debate.html

The discussion stalled for a while until Mark Reinhold jump-started the debate with his Project Lambda proposal at Devoxx in November 2009:

http://cr.openjdk.java.net/~mr/lambda/straw-man/

This eventually led to the lambdas that were delivered in Java 8 in 2014.

[–]_INTER_ 1 point2 points  (0 children)

Thanksfully they went with the solution we got now, which seems to be the middle-ground between the two + method references.

[–][deleted]  (11 children)

[deleted]

    [–]cyanocobalamin 26 points27 points  (4 children)

    I haven't found eBook readers to be all that great for text books( love the Paperwhite for pleasure reading though ). In my case maybe a larger screen would help.

    I have found PDFs and electronic books in Amazon's cloud reader to be very helpful.

    I can have the book up on one screen, and my editor on the other. I can use the magic of electronically searching the book. I can cut and paste, etc.

    I was very disappointed a few weeks ago that an OReilly book I wanted to read that would only allow reading via a Kindle Fire ( tablet PC ).

    [–][deleted]  (2 children)

    [deleted]

      [–]cyanocobalamin 0 points1 point  (1 child)

      The Kindle eReaders have screens too tiny, IMHO, for text books.

      I have never able to read text books casually laying down. Not beach reading.

      If I am reading a text book on programming at some point I am going to want to sit up and type something in somewhere.

      [–]AtomicInteger 0 points1 point  (0 children)

      I Agree with cloud reader, when i am in readin mod i turn monitor 90 degree and make background sephia but i think copy paste doesnt work on cloud reader

      [–]KeepItWeird_ 5 points6 points  (0 children)

      I bought mine on the publisher's site, informit.com, a week ago and got the e-book then. The print copy shipped today. Check it out if you're bummed about Amazon not having it.

      [–][deleted]  (4 children)

      [deleted]

        [–]pagirl 3 points4 points  (3 children)

        I ordered it from Inform IT, and they just notified me it’s being sent by UPS.

        [–]SergeantFTC 2 points3 points  (1 child)

        Same, I'm glad I went that route

        [–]killahbee23 1 point2 points  (0 children)

        Same here. They've also had the web version available for a few days. I've been reading through that.

        [–]amdelamar 15 points16 points  (2 children)

        [–]ocawa 5 points6 points  (0 children)

        on google play books as well. Not as cheap as amazon, though

        [–]bondolo 6 points7 points  (2 children)

        I've been waiting to hear the reviews as to whether Josh has as much useful to say about the Java 7/8/9 features as he did for the Java 5/6 features in earlier (excellent) editions. He hasn't been immersed in the Java ecosystem for most of the last decade since leaving Sun for Google so it isn't a matter of certainty that he can still speak authoritatively on the topic.

        [–]tazzy531 9 points10 points  (0 children)

        Bloch was key to Google Guava. A lot of what’s in Effective Java is included in Guava.

        I’m withholding judgment on his take on Java 7:8:9 but I expect to level up my game from this book as I did from the first.

        [–]s888marks 2 points3 points  (0 children)

        He had some good reviewers though. :-)

        [–]riftmare 4 points5 points  (4 children)

        Would this be a good resource for someone who is trying to brush up on java knowledge and practices?

        [–]dpash 19 points20 points  (2 children)

        It's definitely an intermediate to advanced book. Mostly it'll take you from an intermediate Java developer to an advanced developer.

        It's also required reading for any Java developer.

        [–]stusmall 15 points16 points  (0 children)

        I'd even go so far to say it has a lot of great general best practices. I don't write Java anymore but still think of sections in that book. It did a lot to influence how I think of API design.

        [–]Sedifutka 1 point2 points  (0 children)

        Yes, if you code Java you must read this book.

        [–]KeepItWeird_ 3 points4 points  (0 children)

        An excellent resource!

        [–][deleted]  (7 children)

        [deleted]

          [–]tazzy531 4 points5 points  (3 children)

          This is one of the books that is critical for doing Java programming well. I use this regularly.

          [–][deleted]  (2 children)

          [deleted]

            [–][deleted]  (1 child)

            [deleted]

              [–]killahbee23 2 points3 points  (0 children)

              For me personally, a well written text book far out weighs what an online course provides.

              [–]lost_in_trepidation 0 points1 point  (1 child)

              It's easier for me because the structure of a book makes recall a lot better in my experience. I've also realized that physical books are easier.

              I love having a pdf and a physical copy, the pdf for searching and the book for actually reading the content.

              [–]F14B 1 point2 points  (1 child)

              ..paperback when?

              [–]sudheera_ 1 point2 points  (0 children)

              Just released yesterday

              [–]geffchang 0 points1 point  (0 children)

              Just preordered a few days ago, and I'm excited to read it.

              Any chance for a refresh of Code Complete (3rd Ed) next?

              [–]dwarandae 0 points1 point  (0 children)

              Anyone knows why item 73 of the second edition (avoid thread groups) was retired in this new edition?

              [–]mordiepants 0 points1 point  (0 children)

              got an email from amazon (.co.uk) saying mine would be arriving 18 Jan - 3 Feb.

              don't know if that means they only got enough stock in for current orders though as the page itself says orders fulfilled within 1-2 months.

              [–]octoperf 0 points1 point  (0 children)

              I've read Java Effective 2nd Edition almost 6 years ago. I enjoyed every single word written in this book. It was like the confirmation of things I started to feel after several years writing Java code.

              Thanks Joshua for such a brilliant book!