-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tom Tromey wrote: >>>>>> "Roman" == Roman Kennke <[EMAIL PROTECTED]> writes: > > Roman> we are having problems here with java.io.File on Windows CE. Which > Roman> handles files different again than other Windows and of course > Roman> different than Unix. > [...] > Roman> Maybe we should get rid of all the special casing anyway and provide a > Roman> default straightforward impl for Posixy systems, for the sake of > Roman> efficiency and cleanness. > > It seems to me that this is an area we haven't handled very well: this > isn't really a "VM" thing per se -- the code could very well be > written in pure java -- but rather a platform thing. > > I agree that adding special cases in File just makes the code uglier > and uglier. But, we could delegate to a pure java "platform" class, > with instances for "posixy", Windows, Windows CE, etc, and share the > code across all VMs. > > We do something vaguely similar to this in libgcj (though in the > specific case of File we put the platform stuff in native code). >
FWIW I agree. Some of us were chatting about this on IRC, and not only are these "VM" interfaces more often than not platform interfaces (or with some things, all they rely on is JNI and standard C), but they do lead to performance hits (witness our direct ByteBuffer). I think putting some design thought into this is a good idea, because right now I don't think we have any clear idea about what the scope or purpose of VM/platform interfaces are. Right now, it looks like it's just an ad-hoc catch-all for anything that can't be done in pure Java -- you slap a VM class on it, and hack up the core class. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEVAwUBROIpJuRILCRAfKHCAQIX5wf/aog1Jk+M1HNBKd7HZ6vzciTuPAynvlZ+ U+v7fvGI4FWaoCMUidB3rwov+gJhTXFpJpBy7ytGRExgpaJNp2Mp3kDpUJiInwYs pGh4rmzPvEd8dgkRyL7e4ccBF9ze7Ix7DzhXsldgNypOBDN+Bs7e1A9PjClnxQN8 t84Ii6YKeiifusAPRtgkmsS1wKF4PbCZ7YOdtT/BI6PfaERpgI4V/EnKASwx5Zp2 Z43NGTi/vvRb+qeOFbfhs8XA41EK5eb7ODDD6+W88PKcPUGLgaDlWHCP92XZdrS2 I/K4Ca9vluGs94WcMaflz7dFv9ofko4s9LmygqTIY+I8BKaXz2jTTw== =V2jF -----END PGP SIGNATURE-----