Java Generics and Collections

I just noticed the existence of this O'Reilly book penned, so it seems, by Maurice Naftalin and (believe it or not) Philip Wadler! Is this for real, or a very elaborate hoax? It seems possible, if you remember the history of Java generics, so I guess it's true, but if someone actually saw a copy I'd be reassured...

The blurb, by the way, is from Gilad Bracha who says that this is a crystal-clear tutorial that starts with the basics and ends leaving the reader with a deep understanding of both the use and design of generics. Ya think?!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Yes, it really is from Phil

Yes, it really is from Phil Wadler. I was at his OOPSLA keynote this year, and he mentioned this book there as well.

Look upon my corner cases, ye mighty, and despair!

Wadler was one of the people behind the Java generics precursors, Pizza and GJ, so his involvement makes sense from that perspective. It is kind of amusing to see his name on an O'Reilly book, though.

The blurb, by the way, is from Gilad Bracha who says that this is a crystal-clear tutorial that starts with the basics and ends leaving the reader with a deep understanding of both the use and design of generics. Ya think?!

The part that scares me is "...from the most basic uses of generics to the strangest corner cases." I shudder to think about the strangest corner cases of Java generics that Phil can come up with!

Wadler was one of the people

Wadler was one of the people behind the Java generics precursors

I alluded to that.

I shudder to think about the strangest corner cases of Java generics that Phil can come up with!

Quite.

It is kind of amusing to

It is kind of amusing to see his name on an O'Reilly book, though.

Why is that?

Incongruity

Just because it seems incongruous. Most of Wadler's work wouldn't fit into any of O'Reilly's existing categories.

Perhaps a book that covers e.g. Call-by-value is dual to call-by-name could be slotted into O'Reilly's maths category, alongside "Baseball Hacks"?

I look forward to the day when O'Reilly adds the necessary categories!

The necessary categories?

Perhaps a title along the lines of "Learning Category Theory" or "Category Theory Cookbook"?

You forget to mention

You forget to mention "Categories in a Nutshell" - or wouldn't it be better titled "The category of nutshells"?

I'd buy it!

As a non-math person I wish someone would do Category Theory for Dummies. I tried the other usual suspects and still come up short.

Pointers galore

You might want to start with this thread. You will find quite the answer to your prayers! (Note, Cheney moved, I've found the slides here.)

Dead-tree-wise, Benjamin Pierce's book, Basic Category Theory for Computer Scientists is quite approachable. Barr & Wells's Category Theory for Computing Science is accessible too.

You can also try with Fokkinga's "A Gentle Introduction to Category Theory", and "Calculate Categorically!" (which could be added to the Papers list, BTW).

While looking for a paper of which I can't remember even the name, I've found Rydeheard & Burstall's Computational Category Theory, which might be interesting.

Category theory for beginners

Here are some Category Theory for Beginners slides (seen on Reddit). May be helpful in conjunction with other material.

Draft online

It is quite a good book actually. You can read the drafts at this website: https://java-generics-book.dev.java.net/

It's a great book

I just got my copy and have only riffled through it, but already I can tell this is about the best book I've seen on collections. Rather than the standard "Here's a queue..." set of presentations, Naftalin and Wadler go more deeply into implementation details and present the comparative performance of various data structures for specific tasks. The tone is predictably serious and thoughtful. A big improvement from most of the basic-level tutorials.

book review...