Now, if you want to use a class written in ObjM2 from within ObjC
code, then you'd have to know the prefixing scheme and refer to the
class in its raw prefixed name, like ...
that's not really going to fly with ObjC developers is it?
Of course you can do ...
#define FooClass ObjM2_FooLib__FooClass
... and the ObjM2 compiler could even generate the FooClass.h
header file for ObjC accordingly including the macros, but this is
not going to help with strings which represent class names because
the preprocessor won't replace any occurences of FooClass inside a
string, or will it?!
Again, the ObjM2 compiler could insert a macro ...
#define CLASSNAME(x) "ObjM2_FooLib__" # x
... but this requires ObjC developers to use CLASSNAME(FooClass)
everywhere in the ObjC code where they would otherwise just use
"FooClass" which is much shorter, though in this case it would be
incorrect.
There are other more important problems. I don't think this one
should be a concern.
One solution would be a "flattening" keyword on the ObjM2 side (not
very flexible) and other solution would be an importing function on
the ObjC side and that would be pretty easy and flexible.
Cosider the following code which imports FooBarCo_ClassX as ClassX.
Note that after the importClass() call, ClassX is *fully* equivalent
to FooBarCo_ClassX, there's actually no way to tell which one is
original and which one is imported from this point on.
_______________________________________________
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