[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Suggestion: "usertype()" function
- From: Coda Highland <chighland@...>
- Date: Thu, 31 May 2012 09:33:57 -0500
On Thu, May 31, 2012 at 12:03 AM, Geoff Leyland
> On 31/05/2012, at 4:52 PM, Coda Highland wrote:
>> I'd like it better if it were t.is(string), because then you're not
>> using strings for type matching but instead confirming the actual type
> What's your objection to strings? I've tried variations on the type.isa(object) and isa(type, object) and ended up with what I suggested earlier.
Namespace collisions. Two types could easily have the same name,
especially if they're coming from different sources. This isn't
possibly a problem with type.isa(object). Maybe it's not likely to
happen in reality, but why use strings when you don't have to?