• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dynamic Languages [was: Re: why Obj-C]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic Languages [was: Re: why Obj-C]


  • Subject: Re: Dynamic Languages [was: Re: why Obj-C]
  • From: Thomas Lachand-Robert <email@hidden>
  • Date: Sat, 6 Apr 2002 17:46:02 +0200

Le samedi 6 avril 2002, ` 05:14 , Matthew Johnson a icrit :

Thanks for the response. Those examples were great.

I even attempted to write the exercises in C and realised that if I was
going to use that programming methodology using the C language I would have
a extensive library and a set of very very generic structures before I
started your exercises. But these would be a framework that I could reuse
forever.

I hope we all can use Objective-C forever...

Once I had completed this initial work. Completing your Exercises would be a
trivial task.

But the library would be the answer to the exercises, and it is not trivial!

Having said that I realised that by going through the whole process of
writing the framework that I was essentially writing Obj-C :)

Thanks again for your input :)


Your are welcome. There is a large number of great ideas in the design of Objective-C, but many of them are not apparent at first sight. And a lot of people are deterred by the brackets, etc. I used to be, too. But you should notice that using this odd syntax has at least a great advantage: there is no interference with C. This is so true that actually Objective-C does not interfere at all with the syntax of C++. Consequently, there is a language combining the two with no problem, and obviously named "Objective C++".


P.S here is the start of my thinking in case your interested. It should be
obvious what I was thinking from the following structures.

typedef struct
{
char *varname;
char *type;
void *data;
} data,*dataPtr;

typedef struct
{
char *methodname;
void *function;
} method,*methodPtr;

typdef struct
{
char *name;
dataPtr *data;
methodPtr *methods;
int mcount;
} classyStruct,*classyStructPtr;

typedef struct
{
classyStructPtr *myClasses;
int count;
} myClassLibrary,*myClassLibraryPtr;



I believe you start to understand how Obj-C works ;-) But let the language do that for you; some clever guys programmed it twenty years ago, and it performs quite well... It is not magic, but it is brilliant. (Compare with C++, which is more obvious, but very confuse.)

Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Dynamic Languages [was: Re: why Obj-C]
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: problem with NSMatrix
  • Next by Date: Re: problem with NSMatrix
  • Previous by thread: Re: Dynamic Languages [was: Re: why Obj-C]
  • Next by thread: Re: Dynamic Languages [was: Re: why Obj-C]
  • Index(es):
    • Date
    • Thread