From: "Volkmann, Mark" Date: 2002-11-26T07:26:03+09:00 Subject: Re: Things That Newcomers to Ruby Should Know (11/24/02) This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C294D1.754DBDA0 Content-Type: text/plain; charset="iso-8859-1" It's all a matter of what you're used to. My guess is that most developers that have spent significant time using languages that support ++ and --, such as C++ and Java, miss having them in Ruby. The extra keystrokes are one issue, but a bigger one to me is just having to remember that they aren't supported in Ruby. It wouldn't be a problem if I could only program in Ruby, but since I still have to code in Java a lot (not necessarily by choice), I end up typing the following in Ruby. i++ backspace backspace space += space 1 > -----Original Message----- > From: Rando Christensen [mailto:rando@babblica.net] > Sent: Monday, November 25, 2002 4:11 PM > To: ruby-talk@ruby-lang.org > Cc: dcarrera@math.umd.edu > Subject: Re: Things That Newcomers to Ruby Should Know (11/24/02) > > > Tue, 26 Nov 2002 06:30:36 +0900: Daniel Carrera (Daniel Carrera > ): > > > > 9. Ruby has no pre/post increment/decrement operator. For > instance, > > > x++ or x-- will fail to parse. > > > > Why is that? x++ and x-- are very convenient. I sort of understand > > why++x and --x don't exist. But why can't numbers have a "++" and > > "--" method? > > I don't see it as that big of a deal. "very convenient"? How > about "marginally convenient"? Really, how much more > convenient is this: > > x++ > > over this? > > x += 1 > > By my count, it's two spaces, a shift key, and an extra character. And > you can drop the spaces if you'd like. But the second form certainly > seems more clear to me, and I even use +=1 over ++ in /all/ > languages I > code in. > > If Ruby supported neither ++ /nor/ +=, then it'd get a little > annoying, > as you'd have to x = x + 1, but I really just don't see what makes it > "very convenient". > > > -- > < There is a light that shines on the frontier > > < And maybe someday, We're gonna be there. > > < Rando Christensen / rando@babblica.net > > *********************************************************************************** WARNING: All e-mail sent to and from this address will be received or otherwise recorded by the A.G. Edwards corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ************************************************************************************ ------_=_NextPart_001_01C294D1.754DBDA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: Things That Newcomers to Ruby Should Know (11/24/02)

It's all a matter of what you're used to.  My guess = is that most developers that have spent significant time using languages th= at support ++ and --, such as C++ and Java, miss having them in Ruby. = The extra keystrokes are one issue, but a bigger one to me is just having = to remember that they aren't supported in Ruby.  It wouldn't be a prob= lem if I could only program in Ruby, but since I still have to code in Java= a lot (not necessarily by choice), I end up typing the following in Ruby.<= /FONT>

i++ backspace backspace space +=3D space 1

> -----Original Message-----
> From: Rando Christensen [mailto:rando@babblica.net]
> Sent: Monday, November 25, 2002 4:11 PM
> To: ruby-talk@ruby-lang.org
> Cc: dcarrera@math.umd.edu
> Subject: Re: Things That Newcomers to Ruby Should K= now (11/24/02)
>
>
> Tue, 26 Nov 2002 06:30:36 +0900: Daniel Carrera (Da= niel Carrera
> <dcarrera@math.umd.edu>):
>
> > > 9. Ruby has no pre/post increment/decreme= nt operator. For
> instance,
> > > x++ or x-- will fail to parse.
> >
> > Why is that?  x++ and x-- are very conven= ient.  I sort of understand
> > why++x and --x don't exist.  But why can'= t numbers have a "++" and
> > "--" method?
>
> I don't see it as that big of a deal. "very co= nvenient"? How
> about "marginally convenient"? Really, ho= w much more
> convenient is this:
>
> x++
>
> over this?
>
> x +=3D 1
>
> By my count, it's two spaces, a shift key, and an e= xtra character. And
> you can drop the spaces if you'd like. But the seco= nd form certainly
> seems more clear to me, and I even use +=3D1 over += + in /all/
> languages I
> code in.
>
> If Ruby supported neither ++ /nor/ +=3D, then it'd = get a little
> annoying,
> as you'd have to x =3D x + 1, but I really just don= 't see what makes it
> "very convenient".
>
>
> --
> < There is a light that shines on the frontier &= gt;
> <   And maybe someday, We're gonna be = there.   >
> <    Rando Christensen / rando@ba= bblica.net    >
>



***************************************************************************= ********
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
***************************************************************************= *********
------_=_NextPart_001_01C294D1.754DBDA0--