From: Dumaiu Date: 2007-12-10T00:15:05+09:00 Subject: Re: How much would variable declarations in Ruby make you wince? 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. 1). I'm not yet convinced that some kind of sophisticated DBC thing amenable to duckies can't be created. 2) would be helpful, but it may be a mistake to insist on a keyword. I think we should concentrate on putting everything that can be into a DUIIYDLI module ('Don't use it if you don't like it'). Then the skeptics can't complain. -Jonathan