[Newbies] OOP Question - adding methods to core classes
leves at elte.hu
Sun Oct 31 03:34:47 UTC 2010
On Sat, 30 Oct 2010, Sean P. DeNigris wrote:
> I was thinking how beautiful this code could be if each class had it's own
> encode method, like:
> In method protocol *xmlrpc
> BONUS: if this was the case, extending for new types would be ridiculously
> trivial - just add the method to the type instead of trying to hook into
> large control structures, e.g.
> * so that a Symbol on the ST end is recognized as a Symbol on the Ruby side
> (ends up as a string right now)
> *so that I can talk to remote Ruby objects
> OTOH, I was concerned about cluttering the core classes. I've been going
> back and forth with this kind of thing since I came to Smalltalk, never got
> it resolved.
> What do you think?
I agree with you. :) Core classes won't be cluttered, because you'll add
only 1-2 methods to a separate method category. Btw XML-RPC is so simple
that it could be reimplemented in an hour.
> View this message in context: http://forum.world.st/OOP-Question-adding-methods-to-core-classes-tp3020788p3020788.html
> Sent from the Squeak - Beginners mailing list archive at Nabble.com.
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
More information about the Beginners