Phlip
7/26/2008 4:22:00 PM
Robert Dober wrote:
>>> Ruby expects to assign constants only once. If you called aidy() twice, the
>>> constant would re-assign, and it therefor would not be constant.
>>>
>> Excellant explanation.
>
> But not quite correct, constants *can* be reassigned all you get is a warning.
Read my verbiage again.
And... constants are only labels. Unless you .freeze their targets, you can
..replace them, etc. etc...
One almost misses C++, where they fill the language up with risks and loopholes,
all to allow most 'const' things to optimize at compile time without global
knowledge...
--
Phlip