Posts Tagged ‘generics’

Re: The Mysterious TreeMap Type Signature

Thursday, January 24th, 2008

[This is a comment on the recent post The Mysterious TreeMap Signature by D. Spinellis, also posted in his blog.]

Recently I had to delve into Java Generics quite deep, since I (as my search concluded) needed to use

public class Foo<t extends Foo<T>>

recursive constructs for a personal project (which by the way are fixed-point equations of the form x=f(x) !). The point is I had to read a lot (including Anglelika’s marvelous contribution) in order to understand what is going on beyond the overhyped and embarassingly simplistic for-each construct.

Unfortunately, it seems the JDK is full of compromises of the kind described in the post. I do not argue that compatibility is a bad issue. I am just concerned with what else will follow in the road to Java evolution, since I do not want to see this wonderful and very pragmatic language become lame.

About five years [correction: after thinking better about it, I believe it is more than six or seven years] ago, I envisioned a merging of the Functional and Object-oriented paradigms. This need had come out my experience in designing and programming. I had next-to-none experience with FOP, but it was too obviously appealing to my brain to ignore it… Today, I would like to experiment with scala a bit, time permitting…