On Mon, 17 May 2004 16:50:19 +0200, Robert Klemme wrote: >> Broken record time: >> >> The problem with all of these solutions is that they are discovered at >> run-time. I find it increasingly irritating when I have to debug >> typing errors by running an application that takes some time to get to >> the error. Enough of those times, the error is a typing error, so that >> I've been harping lately about wanting a duck-type checker hooked in to >> "ruby -c". > > I guess due to the nature of Ruby it's impossible to check this without > actually executing the code because of Ruby's dynamic typing. > > If you want compile time type safety you need to use a statically typed > language. Both types of programming languages have their pros and cons - > but you can't get both at the same time. What about Objective-C? It has static typing (with regular pointers) and kind of dynamic typing ("id" type). Maybe Ruby should have similar capability? Or maybe I just told something really stupid? -- Marek Janukowicz