From: "Hal E. Fulton" Date: 2002-09-08T07:51:57+09:00 Subject: Re: Larry Wall's comments on Ruby ----- Original Message ----- From: "Christoph" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Saturday, September 07, 2002 2:02 PM Subject: Re: Larry Wall's comments on Ruby > "Gavin Sinclair" wrote > .... > > > For example, we only have "everything's an object" behavior > > > for some math intrinsics and the interface for files is a bit > > > strange, e.g., I expected 5.cos or aFile.rename('toThisName'), > > > not Math.cos(5) and File.rename(aFile,'toThisName'). > > > > 5.cos, 5.arcsin, 5.tenthroot, 5.inverse, 5.negative, 5.prime? > > > > It has to stop somewhere. > > Why? - once I get used to {}.inverse, 5.abs or 5.0.finite? I find > zero, zip, nil reasons for expecting why 5.0.inverse, 5.0.sin or > 5.prime? would work differently? > > > > > The methods you can call on numbers are intended, IMO, to represent the things > > that numbers have in common. Operations like cos() make sense as pure > > functions. My take on this is that we do things like sin(x) rather than x.sin out of sheer mathematical habit, not based on any compelling logic. Hal