From: Just Another Victim of the Ambient Morality Date: 2007-12-11T01:25:07+09:00 Subject: Re: How much would variable declarations in Ruby make you wince? "Dumaiu" wrote in message news:399c73dc-226e-4e6c-bda5-37104b24dd16@v4g2000hsf.googlegroups.com... > On Dec 8, 7:51 pm, "Just Another Victim of the Ambient Morality" > wrote: >> So, I had a conversation with a colleague of mine and he brought up a >> feature request for another language that is a lot like Ruby but is not >> Ruby. It was an interesting request and, after I had thought about it a >> bit, I discovered that I would like this feature, too! > > Hum. Why don't you try comp.lang.ruby.like.but.not.ruby instead? I > hear it's "phat." > >> The two most popular sources of bugs for me when programming in Ruby >> are: >> >> 1) Passing the wrong object as a parameter to a method. >> 2) Accidentally creating a new variable. > > Seriously, as someone prone to lack of concentration, I agree. A > great many programmers have concluded, probably from painful > experience, that typed variables reduce error. Also I think that > building error-testing into the code will scale better than reliance > only on unit testing. I actually don't think this is the case. Statically typed languages didn't come from long experience with bugs, it was just happenstance... If I'm not mistaken, typed variables came from a world where compiled programming languages failed to completely shield the user from the hardware. Back then, you had to declare variables so that the compiler can know to allocate them from static store when creating the executable image. Later on, when functions became more popular, they also had to do this for the stack. A lot of C syntax comes from how close it is to assembly language...