From: dblack@... Date: 2002-10-31T00:31:24+09:00 Subject: Re: method-call style (Was: Tiny Featureless Ruby Web Server) Hi -- On Thu, 31 Oct 2002, Phlip wrote: > Paul Brannan wrote: > > > I do the same thing. It makes it clear that I'm calling a method and > > not retrieving an attribute. I suppose it comes from my C++ background: > > > > class Foo > > { > > void foo() > > int bar; > > }; > > Programming is about communicating with humans first, a computer second. > > (I'm aware my snippet hardly exemplifies this lofty ideal...) > > I do it to say "calling a function here". > > Props to Matz for not making me always do it. For example, > > puts indescribable.public_methods.sort() > > Drop the middle () because it's redundant. True... but the last () is too, since public_methods.sort can only be a method call. I guess it's a question of what the eye is used to. As you point out, we all get to choose, without any loss of clarity :-) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav