Rick Denatale wrote:
[...]
> Certainly it could be implemented in an extension to the language as
> syntactic sugar much as += and it's family.
> 
> But I maintain, that it can't be implemented as a method, any more
> than += or ||= could be.

I believe you are quite wrong.  If a destructive function like gsub! can 
be implemented as a method, then I see no reason that +=, |=, or postfix 
++ couldn't be.

> 
> If Matz deigned to do such a language change, I'd certainly feel free
> to ignore it. <G>

Well, as others have pointed out, Ruby's preference for iterators rather 
than loops makes ++ a lot less useful.  I use it a lot in PHP, but I 
really haven't missed it in Ruby.

> 
> I can't help but think of Alan Perlis' quip that "syntactic sugar
> causes cancer of the semicolons"

Cute.  Of course, at some level, every programming language is syntactic 
sugar...

> 
> --
> Rick DeNatale
> 
> Blog: http://talklikeaduck.denhaven2.com/
> Twitter: http://twitter.com/RickDeNatale
> WWR: http://www.workingwithrails.com/person/9021-rick-denatale
> LinkedIn: http://www.linkedin.com/in/rickdenatale

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen / marnen.org
-- 
Posted via http://www.ruby-forum.com/.