[Python-Dev] defaultdict and on_missing() (original) (raw)
Bill Janssen janssen at parc.com
Thu Mar 2 17:25:02 CET 2006
- Previous message: [Python-Dev] defaultdict and on_missing()
- Next message: [Python-Dev] bytes.from_hex()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
For an example of methods gone horribly wrong, look at Java, where you have .length, String.length(), and Collection.size(). Give me len() any day. I believe Ruby has similar confusing diversity for looping (each/forEach).
But Java is plagued with the same disease that hit Modula-3, distrust of inheritance. Done right, a base class called SomethingOfWhichTheLengthCanBeComputed would have been defined, with a method "length", and all these other classes would have inherited from it. Never too late to learn from the mistakes of the past...
Bill
- Previous message: [Python-Dev] defaultdict and on_missing()
- Next message: [Python-Dev] bytes.from_hex()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]