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

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

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

From: Andrew Hunt <andy@...>
Date: 2000-05-18 02:30:23 UTC
List: ruby-talk #2868
    Matz writes:
    >Finally, I got access to comp.lang.ruby.

Am I the only one left out in the cold??  My ISP uses 
SuperNews (www.supernews.com) which is apparently not quite
up to speed...

    >Dave Thomas <Dave@Thomases.com> writes:
    >
    >|Does anyone else think that Integer#odd? would be useful?
    >
    >Both
    >
    >  n % 2 == 1
    >  (n ^ 1) == 1
    >
    >would work.  Do we really need it?
    >If I have to add odd?, I'd add even? too.

Well, even? and odd? make the intent much more explicit.

But how would you expect zero to work?  I believe that zero
is considered even (something like: "an integer n is called *even* if 
there exists an integer m such that n = 2m", so 0 = (2)(0) is even).

/\ndy

In This Thread

Prev Next