From: Daniel Brockman Date: 2005-07-16T09:36:16+09:00 Subject: Re: difference? Devin Mullins writes: > Daniel Brockman wrote: > >>Interestingly, `is?' works really well for adjectival arguments: >> foo.is? Enumerable foo.is? Observable >>It's actually not that bad for substantival arguments either: >> foo.is? String foo.is? Array >> >> > Indeed, I like the look of that. I imagine, however, he added the _a > because he didn't want to crowd the method namespace (I assume the > same reason he changed id to object_id). I don't think `is?' crowds it any more than `is_a?'. Rather, I guess he used the latter because `is-a' was a well-established term. >>(Note that `kind_of?' works well in all these cases: >> foo.kind_of? Enumerable foo.kind_of? Observable >> foo.kind_of? String foo.kind_of? Array) >> > I can see that. I guess it's just that I'm not used to thinking of > instances as "kinds." Fair enough. Indeed, when functional programming geeks talk about type systems they will often distinguish between `types' and `kinds'. > Also "kind of" comes off sounding like "approximately," which is > kind of weird. Granted, but that's actually not a completely unsuitable connotation. The Collaborative International Dictionary of English has the following to say about the term ``kind of'': A kind of, something belonging to the class of; something like to; -- said loosely or slightingly. Keep in mind that `kind_of?', unlike `instance_of?', does not check strict class--instance relationships, but allows subtype instances. > I'm obviously too closed-minded for Ruby. :) I don't know... you seem pretty open-minded to me. :-) -- Daniel Brockman So really, we all have to ask ourselves: Am I waiting for RMS to do this? --TTN.