On Aug 23, 2005, at 5:15 PM, Timothy J. Wood wrote:
Given the dynamic runtime around ObjC, this name mangling
approach seems like a very minimal solution that would be pretty
fragile.
In my (possibly deluded) dreams I see ObjC namespaces being first
class citizens, just like Class and Protocol. I have no idea how
this would like in Modula-2, but in ObjC I would imagine:
- (void)addClass:(Class)cls; // just like objc_addClass, but scoped
- (void)addClass:(Class)cls withName:(NSString *)name; // new;
creates an alias of the class
- (void)poseClass:(Class)cls; // just like class_poseAs, but scoped
- (Class)classNamed:(NSString *)className; // just like
NSClassFromString(), .... you get the point
// open question of whether you can have other symbols in the
namespace (global variables like NSString notification names would
be particularly useful)
@end
Brilliant! If namespace ever happens to Objective C, I hope it would
look like this.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden