From: Wilson Bilkovich Date: 2006-04-30T11:06:54+09:00 Subject: Re: Constant in Ruby. On 4/29/06, Charlie wrote: > I'm new to Ruby programming and I saw this article which concerns me: > > http://www.bitwisemag.com/copy/features/opinion/ruby/ruby_debate.html > > Don't get me wrong, I love Ruby. But, the idea that a constant is not a > constant is worrying isn't it? Or have I missed something? Please > comment. > > X = 10 > Y = "hello world" > Z = "hello world" > > X = 20 > Y = "byebye" << "abc" > myvar = Z << "xyz" > > puts(X) > 20 > puts(Y) > byebyeabc > puts(Z) > hello worldxyz > myvar > "hello worldxyz" > That article is horrible. Don't worry about it. Classes are constants in Ruby, so it's good that we can modify constants. Ruby is a scalpel. You can use it to heal or to destroy.