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. ------_ extPart_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 + pace 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 > <dcarrera / math.umd.edu>): > > > > 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 + > > 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 +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 + 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. ************************************************************************************ ------_ extPart_001_01C294D1.754DBDA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12"> <TITLE>RE: Things That Newcomers to Ruby Should Know (11/24/02)</TITLE> </HEAD> <BODY> <P><FONT SIZE=2>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. he 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 Javaot (not necessarily by choice), I end up typing the following in Ruby.</FONT></P> <P><FONT SIZE=2>i++ backspace backspace space += space 1</FONT> </P> <P><FONT SIZE=2>> -----Original Message-----</FONT> <BR><FONT SIZE=2>> From: Rando Christensen [mailto:rando / babblica.net]</FONT> <BR><FONT SIZE=2>> Sent: Monday, November 25, 2002 4:11 PM</FONT> <BR><FONT SIZE=2>> To: ruby-talk / ruby-lang.org</FONT> <BR><FONT SIZE=2>> Cc: dcarrera / math.umd.edu</FONT> <BR><FONT SIZE=2>> Subject: Re: Things That Newcomers to Ruby Should Know (11/24/02)</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> Tue, 26 Nov 2002 06:30:36 +0900: Daniel Carrera (Daniel Carrera</FONT> <BR><FONT SIZE=2>> <dcarrera / math.umd.edu>):</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> > > 9. Ruby has no pre/post increment/decrement operator. For </FONT> <BR><FONT SIZE=2>> instance,</FONT> <BR><FONT SIZE=2>> > > x++ or x-- will fail to parse.</FONT> <BR><FONT SIZE=2>> > </FONT> <BR><FONT SIZE=2>> > Why is that? x++ and x-- are very convenient. I sort of understand</FONT> <BR><FONT SIZE=2>> > why++x and --x don't exist. But why can't numbers have a "++" and</FONT> <BR><FONT SIZE=2>> > "--" method?</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> I don't see it as that big of a deal. "very convenient"? How</FONT> <BR><FONT SIZE=2>> about "marginally convenient"? Really, how much more </FONT> <BR><FONT SIZE=2>> convenient is this:</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> x++</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> over this?</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> x += 1</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> By my count, it's two spaces, a shift key, and an extra character. And</FONT> <BR><FONT SIZE=2>> you can drop the spaces if you'd like. But the second form certainly</FONT> <BR><FONT SIZE=2>> seems more clear to me, and I even use +=1 over ++ in /all/ </FONT> <BR><FONT SIZE=2>> languages I</FONT> <BR><FONT SIZE=2>> code in.</FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> If Ruby supported neither ++ /nor/ +=, then it'd get a little </FONT> <BR><FONT SIZE=2>> annoying,</FONT> <BR><FONT SIZE=2>> as you'd have to x = x + 1, but I really just don't see what makes it</FONT> <BR><FONT SIZE=2>> "very convenient". </FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> </FONT> <BR><FONT SIZE=2>> -- </FONT> <BR><FONT SIZE=2>> < There is a light that shines on the frontier ></FONT> <BR><FONT SIZE=2>> < And maybe someday, We're gonna be there. ></FONT> <BR><FONT SIZE=2>> < Rando Christensen / rando / babblica.net ></FONT> <BR><FONT SIZE=2>> </FONT> </P> <CODE><FONT SIZE=3><BR> <BR> ***********************************************************************************<BR> WARNING: All e-mail sent to and from this address will be received or<BR> otherwise recorded by the A.G. Edwards corporate e-mail system and is<BR> subject to archival, monitoring or review by, and/or disclosure to,<BR> someone other than the recipient.<BR> ************************************************************************************<BR> </FONT></CODE></BODY> </HTML> ------_ extPart_001_01C294D1.754DBDA0--