Re: [Pyobjc-dev] Bridging NSMutableString, a compromise
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-02-07 16:07:35
|
On Friday, Feb 7, 2003, at 10:54 US/Eastern, Just van Rossum wrote: >> If you're going to go that far, why not define your unicode subclass >> in such a way that s.someNSStringMethod() works? Unless the class in Python is truly a subclass of NSString/NSMutableString, access to the NSString methods are likely best left to going through one extra level of indirection for the reasons that Just describes. Personally, I have no particular problem with NSString.someRandomMethod(fooWrappyUnicodyStringThingy) either. As much as we need to preserve identity across the bridge and avoid copying as much as humanly possible of performance reasons-- strings are used *a lot*-- the differing semantics of PyString vs. NSString are such that making it highly visible in code that you are expecting a string to behave like one or the other is probably a good thing. b.bum |