-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On May 22, 2008, at 1:01 PM, Dave Bass wrote:
> George Wang wrote:
>> However, the constant variable can still be
>> reassigned even though a warning is issued.
>
> Am I the only person who thinks that constants should be unchangeable?
>
> Being new to Ruby, it seems weird to me that constants aren't actually
> constant. I'm sure there must be some arcane reason for it, but surely
> most people want their constants to remain constant! That's how it
> works
> in most languages.
>
> Freezing would seem like a good idea but I haven't actually tried it.
> Yet.
> --
> Posted via http://www.ruby-forum.com/.
>
If you noticed, class names are constants. As you can change classes
at runtime, constants must be changable.
Actually overwriting Constants emits a warning. A you should program
warnings-free, that should be no problem :).
Regards,
Florian Gilcher
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkg1WvgACgkQJA/zY0IIRZYmkQCeJvyw4XwGA2+sYWN8RdYt+F/7
1pkAn3pRTl129HoSddfetPJhyji3gBg/
=8BGR
-----END PGP SIGNATURE-----