On Thu, 12 May 2005, Michel Martens wrote:

> On 5/12/05, Robert Klemme <bob.news / gmx.net> wrote:
>> Brian Schr=F6der wrote:
>>> On 12/05/05, Gavin Kistner <gavin / refinery.com> wrote:
>>>> On May 12, 2005, at 1:48 AM, Brian Schr=F6der wrote:
>>>>> On 12/05/05, Phrogz <gavin / refinery.com> wrote:
>>>>>> I tend to use {
>>>>>> and } for blocks instead of begin/end in my own code because IMHO
>>>>>> it visually groups it better, but I used begin/end here since that
>>>>>> seems to be the emerging multi-line choice of the community.)
>>>>>
>>>>> I just wanted to throw in that I'm in the camp of people who use
>>>>> begin end when the side effect is important and braces when the
>>>>> return value is important.
>>>>
>>>> I had no idea that there was such a camp. I like that.
>>>>
>>>> Can I come hang out in your camp? I'll bring my own sleeping bag and
>>>> marshmallows.
>>>>
>>>
>>> In this case you're welcome. I know I read this in two independent
>>> blog entries, but I can't find them now. So I imagine i do not really
>>> own this camping site ;-)
>> =20
>> If you got thrown out you can come over to my camp ("it's on one line ?
>> use braces : use 'do ... end'") - we have plenty of space over here.  As
>> you can see I also frequently visit the ternary operator camp...
>> ;-)
>
> We are on the same camp. I'm the one who also uses the ternary
> operator but doesn't like how it fits with question-mark methods
> (@camp.nil? ? 'nil?' : @camp.empty? ? 'empty?' : '!') because it
> sounds too intriguing.

it's a bit OT - but that's the single reason i made my traits lib define both
a reader method AND query method for each trait (by default).  eg. you can do
this

   class C
     has :a => 42
   end
   c = C::new

then either

   if c.a?
     p 'a'
   else
     p 'not a'
   end

OR

   p(c.a ? 'a' : 'not a')


for any/all traits because i too find the 'var? ?...' construct just a wee bit
interrogative - yet prefer to use the ternary op if at all possible.

cheers.

-a
-- 
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| renunciation is not getting rid of the things of this world, but accepting
| that they pass away. --aitken roshi
===============================================================================