
Dec. 4, 2003
2:54 a.m.
Mike Thompson <mike.thompson@day8.com.au>:
Of course, this obvious solution has a problem: a programmer can't easily sub-class Int.
I can't see that subclassing int is a particularly useful thing to do, even as matters stand today. As soon as you do any operation on your int subclass, you get a result which is not an instance of your subclass any more, which makes using it rather fragile. Does anyone have a real-life use case for subclassing int? Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+