[Bamboo-Users] Java 1.5
Sean C. Rhea
srhea@cs.berkeley.edu
Fri, 05 Nov 2004 11:14:25 -0800
--Apple-Mail-18--1031702200
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed
All,
I'm considering moving Bamboo to Java 1.5. The purpose of this email
is to determine how many of you could no longer use Bamboo if I did so.
Sun has released the 1.5 JDK for Windows, Linux, and Solaris. The Mac
OS X release of 1.5 won't be available until they ship Tiger (or until
now, if you shell out $500 for the developer preview), but you can use
Sun's early access compiler on Mac (I've tested it successfully):
http://java.sun.com/developer/earlyAccess/adding_generics/
It supports generics, static imports, and the new for loop. In theory,
any platform that has a 1.4 JDK can use it to compile and run 1.5
applications, also, but I've only tested it on Mac.
Java 1.4 doesn't work at all on FreeBSD, so we're not losing anything
there.
Now, why Java 1.5, you ask, and why now? Well, I want to switch now
because I don't have any paper deadlines for a while, and the PL
deployment is working well enough to give me some breathing room. As
for why 1.5, I really want generics, for several reasons. The obvious
reason is that I want better compile-time checking on type safety of
collections.
The less obvious reason that I want generics is that I want support for
currying in function objects, as provided by the wrap function in David
Mezieres' libasync. If you don't know about libasync, its the C++
library that bamboo.lss.ASyncCore is modeled after. libasync provides
a set of functions called wrap, which given a function object (such as
bamboo.lss.ASyncCore.TimerCB) that takes n arguments, along with k
argument values, return a new function object that takes n-k arguments.
This functionality is REALLY useful for event-driven programming.
Anyway, with Java 1.5, we can implement wrap. In fact, the code is
already in Bamboo: run bamboo/src/bamboo/lss/Callback.pl to see it.
So, back to the original question: for which of you would Java 1.5 be a
show-stopper?
Sean
--
Human beings were created by water to transport it uphill.
-- Unix fortune
--Apple-Mail-18--1031702200
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFBi9EWzBwMl0DQ21gRAqkpAJ9KxJ1CHQ/HirYM+t+vilyGgTM8ugCfUnmv
AWVjCdSQwe9qzWG2ngfQ+Go=
=inLA
-----END PGP SIGNATURE-----
--Apple-Mail-18--1031702200--