Dynamic binding -- Qt's Signals and Slots vs Objective-C

Fredrik Olsson peylow at gmail.com
Wed Sep 27 07:26:34 PDT 2006


Lucas Goss skrev:
> Bill Baxter wrote:
>> Gotta go, but I think some sort of built-in dynamic dispatch mechanism 
>> like this would have to be part of my "dream language".
>>
>> --bb
>>
> 
> I think I'm of the same opinion. I'm just starting to learn Obj-C now...
> 
> lucas

I want to agree as well. But hmm... how D and Obj-C tackles OOP is so 
very different that I can not see any way to merge the two.

So just as you can not seamlessly mix C++ classes and Obj-C classes in 
Objective-C++, I can not see how D classes and Obj-C classes could be 
mixes seamlessly in any practical way.

So if (a big IF) Obj-C type classes should ever be added to D I think an 
Objective-D dialect, just as Objective-C++. As a bonus there would:
1. Not be reinventing the wheel.
2. Reuse the GNU Obj-C runtime (Already optimized).
3. Reuse/link against GNUStep

I think it would be just like C<->D where code is binary compatible, and 
similar enough for anyone to learn. And it has already been done, with 
Objective Modula-2, so there is a test case to learn from.

And as I have said before; my only problem with Obj-C is C. So the 
thought of Objective-D appeals to me :). Garbage collection, foreach, 
etc. Hmm... all of which are features mentioned by Apple to be part of 
Objective-C 2.0 that comes next spring with OS X 10.5. But well, 
backward compatible can be a heavy anchor.


// Fredrik Olsson



More information about the Digitalmars-d mailing list