From: jstern@... (Josh Stern) Date: 2000-12-14T00:10:02+09:00 Subject: [ruby-talk:7152] Re: Ruby in the US Dave Thomas wrote: >Unfortunately for Ben, Ruby also falls into the "truly horrible idea" >category. Ruby variables are _not_ typed, but take on the type of >whatever they happen to reference at the time. Similarly, the majority >of operators have no semantic meaning to Ruby, as they are simply >method calls. This is the same as the Smalltalk and (in my limited >understanding) the Javascript model. > >This lack of constraint is one of the defining features of the >language. I personally believe that some form of strong typing is invaluable for large projects, but it makes quick development much slower, so Ruby is potentially a great compliment to strongly typed languages just for that reason. But it would also be nice to have flexible facilities for typing and 'design by contract' that operate at run time in Ruby when in 'debug mode', and have little or no overhead when in normal mode - some run time device that is, say, comparable to the assert() macro in C. I just started thinking about Ruby two weeks ago, and just got your excellent book last weekend, so I'm not qualified to say what the best way is to implement that in Ruby (perhaps a mixin for adding extra type info and argument signatures to functions??). -= Josh