Pictures from the latest Fish adventure
I put up some photos and videos of our trip to the Lotus 7 50th Anniversary party in England. Mari-Pilvi and I drove there in our lovely 1989 Caterham 7.
Why buy a normal car when you can have something so much more fun?
I hate types
This article reminded me of my experiences the other day.
I’ve been coding in the j2me environment (yes, that’s right, part of Fishpool’s new product will run on j2me) and I stumbled across the problem of creating an array from a Vector. I wanted to cast that array to the Person[] type, as one does, but as far as I can tell, this is not possible to do in a generic fashion. The MIDP version I am working in, and possibly later ones, does not provide a toArray() method for the Vector so I conjured up my own, which returned Object[]. Arrays are considered to be their own type, and not compatible with one another, even with casts.
So fair enough, this is a design decision on the part of the Java team, but it makes life difficult. Now perhaps if Java had been designed to do dynamic arrays at the core, as one might expect from a supposed high-level language, this whole issue would simply not exist. Even so, in languages such as Tcl this just simply is not a problem. The language flexes to do what I would like, instead of pretending to know better than me what I want.
leave a comment