From: "David A. Black" Date: 2005-10-03T07:00:24+09:00 Subject: Re: C++ equivs in Ruby Hi -- On Mon, 3 Oct 2005, Devin Mullins wrote: > David A. Black wrote: > >> x = 123 >> >> x holds the immediate value 123, rather than a reference to it, which >> is the rationale Matz has always given for not having x++ (i.e., it >> would be equivalent to doing 123++ and that would make no sense). T> > I don't think that's sufficient, else x += 1 would be equivalent to 123 += 1. Not necessarily. There's no cause and effect link here; each thing is decided by Matz. I was talking about my impression over the years of Matz's rationale. Actually, as I re-research it, I see several objections to ++ on the part of Matz, even for cases where the variable does not hold an immediate value (e.g., strings). I tend to agree; I think if you did: str = "abc" str++ neither possibility (the variable str being reassigned, or having ++ be a succ! equivalent) would really fit. (The parser *could* do it, of course; I'm talking about the logic and design.) David -- David A. Black dblack@wobblini.net