From: Patricia Shanahan on 19 Jul 2010 08:43 Mike Schilling wrote: > > > "ClassCastException" <zjkg3d9gj56(a)gmail.invalid> wrote in message > news:i20me2$hm5$1(a)news.eternal-september.org... .... >> Similarly to how Java lacks first-class functions but allows a one-method >> interface like Comparator or ActionListener whose implementations' >> instances can be passed around for similar purposes. > > Yup. Java has one hammer and thus everything is a nail. It would be a little tidier if it did have only one hammer. The handling of primitives gives it a hammer and a screwdriver that only fits a few of the screws. Patricia
From: markspace on 19 Jul 2010 11:59 Patricia Shanahan wrote: > It would be a little tidier if it did have only one hammer. The handling > of primitives gives it a hammer and a screwdriver that only fits a few > of the screws. Don't forget objects like int[], which have methods like toString() which cannot be overridden and so don't exactly fit into the rest of the object model. So: one big hammer, one little screwdriver and this funky looking thing that might be a can opener from WWI or something.
First
|
Prev
|
Pages: 1 2 3 4 Prev: what the benefit is by using annotation, like "@Immutable" ? Next: Ordering of hashtable keys |