Andy wrote: > Well, that brings up an interesting question. What do > you think about implementing Design By Contract in a > non-staticaly typed language such as Ruby? I've toyed around > with several implementations of DBC in Ruby, and once Dave > and I get a bit more of the Ruby book finished I'll look at > it again. > > But would that be a usefull feature to have in Ruby? > Thanks for asking, Andy... :) Actually, I have never steeped myself in DBC. I have tried crude implementations of it at times, but I have never used Eiffel, where it is an integrated language feature. So I can only give my impression, which is: Every little bit helps! In order words, even a crude implementation of DBC is, at worst, no worse than not using it at all. In fact, I think it would be hard to define any real pre- and post-conditions in your code without finding that they were sometimes unexpectedly violated. And if you find that they are violated, presumably you have found a bug. I'm working on a DBC mechanism in Ruby. Let me crank a little longer and I'll make it public for everyone's comments and changes. And there WILL be changes. :) Thanks, Hal