From: pongba Date: 2007-09-03T10:35:14+09:00 Subject: Re: How does ruby handle overloading? On Sep 2, 10:34 pm, Phrogz wrote: > On Sep 2, 6:48 am, pongba wrote: > > > This is a very general argument, what concerns me is ... > [snip] > > One might argue that [...] so the problem is moot. > > But then there's two more problems: > > > 1. if we can't modify Matrix or Graph [...] > > > 2. if '1' doesn't matter (because in ruby we actually can add new > > methods to an existing class), then can you please give another more > > qualified example? > > What I hear you saying is: > > There's a problem with what Matz describes, because... > OK, wait, that's not a problem. > But then there's this other problem: > Er, OK, that's not actually a problem either. > Can you please show me what the problem is? > > I think you've reasoned it out for yourself: there isn't a problem. > Even if it were, the two other responses in this thread show you ways > you could work around it if you needed to (which you don't). lol Basically you're right. What I wanted was an example that can only be solved with overloading, but then there's the ultimate type-switch trick, so.. :P