advertisement

Article:
  The Objective-C Language
Subject:   Definitions of Interface/Implementation, it is in error to say ObjC defines these in seperate files.
Date:   2001-07-04 19:42:04
From:   bigboytoddy
Response to: Definitions of Interface/Implementation, it is in error to say ObjC defines these in seperate files.

I'm replying to my own post so that I don't clutter up the entire first level with comments/points/corrections.


If we are using a OO hybrid-language, and OO supporting libraries, it makes sense to use OO then in our code.


The following


double radius;
double xLocation;
double yLocation;
NSColor *color;



Should be replaced with


NSNumber *radius;
NSNumber *xLoc;
NSNumber *yLoc;


which allows much more consistant usage of the language and the functionality of the method selectors in the frameworks and work of other developers (MiscKit for OSX and such).


This again is one of the PROBLEMS of ObjC, that folks coming over from C continue to use the C definitions, when in fact there is optimized and highly effective means to use objects throughout the language. Apple has done a fairly good job in providing most structures and primative data types with higher level object wrappers. Please, folks, including the author, use them. You will thank yourself and Apple later when the finally get to the point of OO'ing ObjC where it is more consistant.


\t


1 to 1 of 1
  1. Definitions of Interface/Implementation, it is in error to say ObjC defines these in seperate files.
    2001-07-04 19:45:55  bigboytoddy [View]

    • Returned Data types of methods
      2001-07-04 19:49:13  bigboytoddy [View]

      • IMHO the right way to do setter selector definitions
        2001-07-04 20:00:55  bigboytoddy [View]

        • Calling [super init] within your own initXXX methods
          2001-07-04 20:13:20  bigboytoddy [View]

1 to 1 of 1