From: "Hal E. Fulton" Date: 2002-09-10T12:21:54+09:00 Subject: Re: Larry Wall's comments on Ruby ----- Original Message ----- From: "Christoph" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Monday, September 09, 2002 10:13 PM Subject: Re: Larry Wall's comments on Ruby > I hope that once Ruby gets proper namespace support we will > also see the end of the Java'ish module function Math.cos > and it friends. It should be possible to write a little module to mix in methods into Numeric (I suppose) which would do the same thing. If I were a little smarter or less lazy, I'll bet I could do this in fewer than ten lines of Ruby (by writing a little routine to take a symbol and create the new Numeric#foo based on the old Math.foo and then passing in the list of methods :sin, :cos, etc.). > > A problem in making all functions methods of the class of their most > > important argument is IMHO the largest flaw in Ruby: that all method > > names of the given class are put in a single namespace! And class > > names generally too. > > > > I know that it would otherwise not fit the way method calls are > > designed. This is a reason why I'm not a fan of the model. > > I agree with you whole heartedly , expect that it really isn't a failing of > Ruby itself but the single method receiver model Matz and probably > the vast majority of ``Rubyists'' (imo unfortunately) seem to prefer. This is very interesting to me, as the only OO I know is single-receiver. Can you explain the paradigm? A URL would suffice. Hal