[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Java
At 12:30 PM 12/10/01, Morgan McGuire wrote:
> > >____ is so much more convenient and easy to use than Java
> >
> > * First-class functions
>
>FYI, Java 2's anonymous classes nicely fill the gap made by first class
>functions. In Java, you can create a closure and pass it around just
>the way you would with a first class function. Considering the
>language doesn't *have* functions, using classes as closures makes more
>sense than introducing functions, although it is a little verbose.
Actually, I dispute "nicely". I've just been rewriting a very "functional"
Dylan program in Java for my own entertainment, and the "replace a
first-class function with an anonymous class" has been the single
most annoying thing I have had to do.
What could be nicer than
do-lines(write-line, buffer) ?
- Follow-Ups:
- RE: Java
- From: Ken Anderson <kanderson@bbn.com>
- References:
- RE: Java
- From: Scott McKay <swm@hotdispatch.com>
- RE: Java
- From: Morgan McGuire <morgan3d@yahoo.com>