From: Justin Johnson Date: 2002-09-26T23:54:51+09:00 Subject: Re: adding overload to ruby This topic seems to have become side-railed. I'd only ever agree to optional argument type parameters as a means to allow multi-dispatch. This _increases_ the flexibility of the language. It is not the same as type specification in languages like C/C++ or Java. But maybe it appears to be similar enough to never include into Ruby. Forcing type specification for everything would make compilation much easier but would destroy the dynamic nature of Ruby. Which, of course, would be a bad, bad thing. I don't see how adding this feature for multi-dispatch decreases the flexibility/dynamicness of Ruby - only enhances it. -- Justin Johnson wrote in message news:Pine.LNX.4.44.0209260812400.23984-100000@candle.superlink.net... > Hi -- > > On Thu, 26 Sep 2002, Bulat Ziganshin wrote: > > > Hello dblack, > > > > Thursday, September 26, 2002, 3:28:42 PM, you wrote: > > > > >> why you don't want to add overload to mainstream ruby? > > > > dcsn> For me, it's because, as you pointed out, it doesn't correspond to the > > dcsn> dynamic spirit of the language. There are already languages without > > > > pros: > > > > 1) ability to declare several functions with different arguments > > That's circular reasoning -- it's good because doing it allows us to > do it :-) > > > 2) enhanced reliability because argument types declared explicitly, > > not through dynamic using its methods > > It sounds like you consider Ruby's dynamicness a design flaw. If > reliable Ruby code cannot be written, then you're right. (I think > reliable Ruby code *can* be written.) > > > 3) enhanced readability of program, self-documenting > > Ruby already ranks very high among (generally agreed to be) readable > languages already -- more so than some languages with strong typing, > method signatures, etc. > > > of course, second and third becomes more important when application > > grows > > > > cons: > > 1) we can't fake overloaded function with object of another type > > ... more? > > 2) we no longer have a language with Ruby's unique combination of > characteristics. > > That's what it comes down to for me. Is there literally no room in > the world for a language that works the way Ruby works? Why not? > Aren't there enough other options for people who are uneasy with Ruby? > > > may be you don't understand me. ruby core will use old style, new > > declarations will be more appropriate for application code, where > > flexibility is not so great demand and reliability is more important > > You're assuming that writers of applications have nothing to learn > *from* Ruby, and that what they should do with Ruby is make it appear > and behave like other, very different languages. But then, why not > just use those other languages? > > > David > > -- > David Alan Black | Register for RubyConf 2002! > home: dblack@candle.superlink.net | November 1-3 > work: blackdav@shu.edu | Seattle, WA, USA > Web: http://pirate.shu.edu/~blackdav | http://www.rubyconf.com >