Category syntax is a bit odd from my point of view. Their name
doesn't always appear together with the respective class name (in
ObjC: Class(Category)). This fact and the EXTENDS keyword makes
methink of inheritace (that's also what it means in Java - another
Cocoa/GNUstep language) rather than categories.
...
I suppose that this is a better way to go if you want your
extensions to be as close to ObjC as possible. The current syntax
would be confusing for both ObjC and Java developers.
How about "ALTERS"?
For me it's certainly better if keywords are more suitable for Modula
than parentheses.
According to Cocoa/OpenStep practice, init* should be an instance
method. The corresponding class method would be newWithFoo:andBar:, or
fooBarWithFoo:andBar: if it autorelease the return value. Also, the
return type should be OBJECT to allow clean overriding of superclass
initialisers with the same name.
That's right. But after looking at the implementation it doesn't seem
to be a property of Obj-Modula, rather a badly coded example:
Because initWith... shouldn't call +alloc and init should call the
designated initializer (the most precise initWith...) in most cases,
class method shouldn't access instance variables etc. So everything
seems to be the other way around.
There's a lot of things missing too. I wonder about stuff like
@class, @selector, @encode and exception handling. I also don't know
how much Modula-2 differs from C in terms of types (different types
of integers, floats, arrays, function pointers, conventions for
strings, ...) and how this would be resolved. It would be interesting
for people completely new to Modula-2 to know whether calling
functions written in C and passing all the types of arguments already
works in some way or it has yet to be implemented for ObjM2.
I remember the Pascal heritage in Mac OS like length-prefixed strings
and Pascal calling conventions. But Modula may be different.
_______________________________________________
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