[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02867] Re: Just one more wafer thin mint....

From: Yukihiro Matsumoto <matz@...>
Date: 2000-05-18 02:28:32 UTC
List: ruby-talk #2867
The following message is a courtesy copy of an article
that has been posted to comp.lang.ruby as well.

Hi,

Dave Thomas <Dave@Thomases.com> writes:

|> |Does anyone else think that Integer#odd? would be useful?

|>   n % 2 == 1
|>   (n ^ 1) == 1
|
|Now if you're going to exclude methods on the basis that they could be 
|implemented in other ways, I've got a list you could delete ;-)

Agreed.  But is `odd?' needed that much?  I'm not sure.

|> If I have to add odd?, I'd add even? too.
|
|The reason people implement odd but not even is that odd is
|unambiguous, but people seem to disagree about whether zero is even.

Really?  I learned 0 is a even when I was in elementary school.
I thought it was a common sense.

							matz.

In This Thread

Prev Next