Please do not CC me on responses to c.l.r or ruby-talk, wherever you're 
reading this from. I will see the response just fine.

On Wed, 4 Feb 2004 13:49:15 -0500, Guoliang Cao wrote:
>>> I think this is very tricky. ',' equals to '||' here. This should be
>>> made very clear otherwise people should avoid use this form.
>> It's not tricky at all; it's consistent with the way that
>> case..when..end works at all.
> I'm not saying it's inconsistent. What I mean by tricky is it's easy to
> think "when a=='aaa', b=='bbb'" equals to "a=='aaa' and b=='bbb'"
> especially when one never writes this kind of code by himself and reads
> someone else's code.

Not if one knows anything about the way that 'case' works. If I write:

case foo
  when :a, :b, :c

I do not expect that to mean "when foo is :a and :b and :c".

-austin
--
austin ziegler    * austin / halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2004.02.04
                                         * 14.22.31