Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New ObjC style language development




2005/08/19 v 12:35, ObjM2:
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 ...

http://en.wikipedia.org/wiki/Objective_Modula-2


Hello,

I'm an ordinary Cocoa developer with no knowledge of Pascal/Modula-2. I've just looked at the Wikipedia page and it's quite interesting for me, but there's still a lot of information missing. I have just one remark about the proposed syntax:

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 me think of inheritace (that's also what it means in Java - another Cocoa/GNUstep language) rather than categories. Also as noted on the Wikipedia page categories don't necessarily "extend" the class, they can just replace some methods.

What about using this more ObjC-like syntax:

    INTERFACE MODULE ClassY(CategoryX);
    (* ... *)
    END ClassY(CategoryX).

    IMPLEMENTATION MODULE ClassY(CategoryX);
    (...)
    END ClassY(CategoryX).

instead of the current one:

    INTERFACE MODULE CategoryX EXTENDS ClassY;
    (* ... *)
    END CategoryX.

    IMPLEMENTATION MODULE CategoryX;
    (...)
    END CategoryX.

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.

--
Adam Nohejl
Loki Software
mailto:email@hidden
http://lokisw.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

This email sent to email@hidden
References: 
 >New ObjC style language development (From: ObjM2 <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.