Re: [Pyobjc-dev] Auto bridging instances by conversion
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-02-04 12:52:50
|
On Tuesday, Feb 4, 2003, at 04:01 US/Eastern, Just van Rossum wrote: > Sure, eg. in Python this happens with exceptions. However we're not > talking about arbitrary objects, but about real basic immutable types > (strings and numbers). I claim that any code in which the id of an > NSNumber or NSString is important is seriously broken. That claim is faulty. There are many situations where the type of the object is totally irrelevant to the local implementation. That is, as far as the implementation is concerned, everything is an (NSObject*) and the only important piece of information is the id-- the self pointer-- of that object. As Ronald indicated, this situation arises outside of various random performance hacks-- NSMapTables and the underlying CF* types are often used to map instances to other instances, regardless of type, as a part of object graph maintenance. By assuming otherwise, the bridge will cause very subtle, but very ugly, problems in many situations where the developer is going to be mighty surprised that it didn't "just work". We already have that situation with the string conversions that are happening now. b.bum |