From: Gregory Brown Date: 2006-01-10T08:09:58+09:00 Subject: Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? On 1/9/06, James Britt wrote: > Gregory Brown wrote: > > Please elaborate on what you meant by this, because I am interested. > > ( My conception of ruby's type system might have been wrong) > > I'm going to punt and refer you to this: > > http://www.rubygarden.org/ruby?TypesInRuby > > which, hopefully, is both correct and reasonably complete. This page did explain what I was wondering, thanks. > The short answer is, Ruby objects have a type, which essentially is "the > type that responds to those methods I happen to respond to." > > In /most/ cases, asking an object for its class is sufficient for > determining type, but that gets back to the real topic: Not all objects > of, say, class String are assured to respond to the same messages, and > to the extent that so-called String objects differ in their > message-acceptance, they are different types. So would it be agreeable that comparing static typing to duck typing is truly an apples to oranges comparison? That a state driven environment simply cannot be easily compared to a behavior driven environment? And if that's the case, would we benefit most by explaining what exactly a behavior driven system looks like and how to best use it to meet your needs, while avoiding pitfalls? Maybe this would avoid language wars and instead incourage people to just think a little bit differently when they sit down to try out ruby.