Daniel Berger wrote:
> How about....x++ ?
x++ in languages that implement it (PHP I'm sure of, Java and C++ I'm
less sure of) increment x after running the statement. So:
# All of the ++s are how it would be in PHP/Java/C++
def printNum x
puts x.to_s
end
x = 42
printNum(x++) #=> 42
printNum(x) #=> 43
x = 42
printNum(x.succ!) #=> 43
printNum(x) #=> 43
++x increments before passing the variable:
printNum(++x) #=> 44
printNum(x) #=> 44
So even if this was implemented, I think x++ would be a bad syntax to
x.succ! as other languages have something which looks exactly the same
and yet does something different.
Dan