this may not exactly be considered on-topic in respect of ObjC
itself, so I apologise in advance for straying somewhat off-topic,
but it should nevertheless be of interest to readers of this list ...
We are a small group of developers and scholars working to create a
cousin of ObjC so to speak. That is to say, we are using the ObjC
blueprint to add the very same object model and language extensions,
including bracketed Smalltalk message syntax to Modula-2, the result
of which we dubbed Objective Modula-2. The finalised spec will then
be implemented in GNU Modula-2.
At this point we are still involved in design but we are also working
on an experimental parser to test ideas and concepts. The archives of
this list show that there are some readers who ask for extensions or
changes to ObjC.
While we need to stay compatible with the ObjC runtime (ie
objc_msgSnd and objc_addClass) there will be some additions not found
in ObjC which may be of interest to those who'd like ObjC to be
extended.
The data encapsulation model of Modula-2 will allow avoidance of name
conflicts and also the bundling of classes into class clusters and
libraries with what Java calls package level access to instance
variables, ie ...
DEFINITION MODULE ClassLib;
EXPORT ClassA, ClassB, ClassC;
INTERFACE MODULE ClassA : NSObject;
INSTANCE VAR
PUBLIC
a : Foo;
PUBLIC TO ClassB, ClassC, ClassD;
b: Foo;
PUBLIC TO SUBCLASS (* equivalent to @protected in ObjC *)
c: Foo;
PRIVATE
d: Foo;
etc.
then to be used like so ...
MODULE Foobar;
FROM ClassLib IMPORT ClassA AS Fred, ClassB AS Barney, ClassC AS Wilma;
VAR
fred : POINTER TO Fred = [[Fred alloc] init];
barney : POINTER TO Barney = [[Barney alloc] init];
wilma : POINTER TO Wilma = [[Wilma alloc] init];
We also intend to add class variables and perhaps garbage collection ...
VAR
garbageCollected : POINTER TO Foo = [[[Foo alloc] init] gc];
however, all within the boundaries of the ObjC runtime.
It would be of interest to hear from interested Cocoa/GNUstep
developers to get second opinions but also to hear how they think new
features like for instance the missing class variables should work.
Yet, we don't want to bloat the new language. Additions will be
subtle and few.
A first glimpse on what ObjM2 looks like can be found here ...
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
_______________________________________________
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