If there were no single root to the hierarchy, then it would not be possible to write a method that accepts any object as a parameter, or a Collection that holds any kind of object.
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Tony Morris:
Once you step outside of the bounds of Java (by saying "there were no single root to the hierarchy"), then it is certainly possible do "write a method that accepts any object as a parameter".
She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
Originally posted by Ernest Friedman-Hill:
Tony, the example you've linked to seems to replace a universal base class with a universal interface; without discussing the merits of that, I don't think it materially changes this discussion.
Tony Morris
Java Q&A (FAQ, Trivia)
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Originally posted by Rusty Shackleford:
"Everything in java is an object."
That is not true, in some OO languages it is(smalltalk), not in Java.
int, float, boolean, ect...
She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
Originally posted by Ken Blair:
What would you use instead of a common base type?
Tony, I enjoy reading your arguments because it's always interesting to see someone argue against dogma. That being said, challenging the doctrine is all fine and good unless the argument is based on terms and premises you cannot or will not explain and define. At that point it just becomes a rant and clouds what points might have been otherwise understood or even accepted.
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Tony Morris:
I agree entirely - at this very moment, I am making it easier to write and publish articles on my website - I wish I had 8 arms more than you wish I did I promise I've also resigned from my position at IBM and plan to take up a new position soon so I have no idea what my personal time will be like.
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|