Re: Dynamic Languages [was: Re: why Obj-C]
Re: Dynamic Languages [was: Re: why Obj-C]
- Subject: Re: Dynamic Languages [was: Re: why Obj-C]
- From: "Erik M. Buck" <email@hidden>
- Date: Fri, 5 Apr 2002 11:12:43 -0600
- Organization: EMB & Assocites Inc.
----- Original Message -----
From: "Matthew Johnson" <email@hidden>
>
>
One benefit I can see is with shared objects introducing new features to a
>
executable without the need for recompiles. But I can reproduce this in
>
straight C.
>
You can do anything that can be done in straight C. C is a Turing complete
language.
The key to objc_msgSend(someObject, someSelector, someArgument) is that both
someObject and someSelector are variable. With the similar construct in
Java, someSelector is constant and MUST be known at compiler time. Since it
must be known at compiler time, the compiler can use it directly as a
constant offset into a vTable to lookup a member function to call. However,
requiring that someSelector is constant known at compile time eliminates
many possibilities.
Several advantages accrue from having someSelector variable:
1) See automatic undo support
2) See distributed objects
3) See integration with scripting languages
4) See delegation
5) Partial elimination of the need for a command pattern (See target/action)
6) See categories
7) No need for COM or SOM
8) Partial elimination of the fragile base class problem
http://2f.ru/holy-wars/fbc.html
9) High degree of introspection
_______________________________________________
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.