From: William Djaja Tjokroaminata Date: 2002-10-30T01:11:34+09:00 Subject: Re: method-call style (was Re: Snippet: Tiny Featureless Ruby Web Server) dblack@candle.superlink.net wrote: > I have a style-related question: I noticed that you put () after all > method names, and I was wondering what the origin/purpose/whatever of > that was. I'm neither trying to criticize it, nor likely to adopt > it myself :-) Just wondering. Hi David, This is just my personal style. When I write network simulations (not Ruby code fragments), I never put () for methods that are defined simply using "attr_reader", but other methods I usually put () to remind me that I am "doing some real action" here. Well, in Ruby () is really optional for methods without arguments, so I just take this advantage to mimic the C's member data access vs function call distinction. On the other hand, for a method call with a single argument of type block, I don't put () either, because the {} is enough as a reminder to me that "some real action is going on here". Regards, Bill