On Mon, Dec 21, 2009 at 7:18 AM, Stan Shepherd <[email protected]>wrote:
> > > Eliot Miranda-2 wrote: > > > > > > Sorry Sam :) I had to be blunt. I knew you'd understand :) > > > > > > No worries, it made me laugh. > > I do have a question out of it though. Is there a conceivable situation > where you would want Object class to have specific behaviour? If so, as > Object class carries the role of backstop case where other classes don't > define a method, is there any acceptable way to treat Object class > differently? > In general I don't think so. I think it is wrong to assume Object is the root. Squeak currently assumes ProtoObject is the root. In VisualWorks there is a special method rootsOfTheWorld which answers the roots. Smalltalk allows one to create classes that don't inherit form anything else and that is very useful for creating encapsulators. Special casing Object or ProtoObject will break these uses. However, if you were to package up some application in which you knew there would never exist subclasses other than Object, and the performance of allSubInstances was important you would go right ahead and apply that patch. So not in the base, but in a specific app, sure. best Eliot > ...Stan > -- > View this message in context: > http://n2.nabble.com/Issue-1634-Object-allSubInstances-slooooow-tp4189848p4198899.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >
_______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
