Dave Burt
5/6/2005 3:59:00 PM
"Austin Ziegler" <halostatue@gmail.com> disabused:
AZ>>> Can someone give me an example of a time you need an extra level
AZ>>> of indirection?
D>> A reference can sort of replace itself with another object.
D>>
D>> An Integer is immutable, but a reference to an integer can be
D>> changed to any other object.
AZ> I disagree. After all, you've had to use map to replace the integers
AZ> with Ref-to-integer in the first place.
AZ>
AZ> I still haven't seen any reason that this would be necessary -- or
AZ> even useful -- in Ruby. (IMO, John Carter's nil-as-message eater
AZ> would be more useful. And I think it's clear how useful I think
AZ> *that* is.)
You're right, you know.
I'm sure this kind of thing would be used occasionally if it was built into
the language (like VB's "ByRef" and "ByVal" or whatever), but even that much
added syntax makes it almost completely useless as far as I can see. Of
course, I'm going to post to the list if I ever find something it
revolutionizes.
Still, variable constants! That don't warn you about it!
Cheers,
Dave