• 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: That Obj-C/Java Req -- Re: Jobs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: That Obj-C/Java Req -- Re: Jobs


  • Subject: Re: That Obj-C/Java Req -- Re: Jobs
  • From: Sherm Pendley <email@hidden>
  • Date: Sun, 17 Nov 2002 06:34:19 -0500

On Sunday, November 17, 2002, at 05:43 AM, Eric Wang wrote:

concern that the "merging" of the Objective-C and Java runtimes would
degrade the ObjC/Cocoa combo.

I doubt it's as drastic as many seem to think - I highly doubt, for example, that Apple has any intention of making Objective-C run in a JVM, or of compiling Java into native code.

It's probably more along the lines of looking into ways to better enable bridging technology - and I can think of a couple of enhancements to the Objective-C runtime that would simplify that, right off the top of my head:

Currently, the Objective-C runtime supports only a single class handler callback. That means that a bridge that uses this facility to load and register bridged classes on demand won't be compatible with another bridge that does the same thing. A better way would be to allow multiple callbacks, calling each one in sequence until one is found that knows how to register the requested class.

Another issue is message forwarding. Suppose you've registered a class that inherits from an Objective-C class. Now, if you send a message to it that isn't handled in your subclass, it's simple - just build up your argument list and call one of the forwarding equivalents of the message-passing functions - objc_msgSendv() or objc_msgSendv_stret(). Assuming you've registered your subclass properly with the runtime, they'll do the right thing and call the parent methods to respond to the message.

But what happens if your subclass *does* have a particular method, and in that method it wants to make a call to super? Then you have a problem, because objc_msgSendSuper() and objc_msgSendSuper_stret() don't have forwarding equivalents. I'm solving this in CamelBones by writing my own cb_msgSendSuperv() and cb_msgSendSuperv_stret() functions in PPC assembler - but it's ugly, and I shouldn't have to do it.

I won't go on, because I don't want this to start sounding like a rant. I like the current runtime, I really do. Some of the tricks you can do with it - like adding methods to a class at runtime - border on magic. But, there's still room for improvement, especially where making it friendlier to foreign-language bridges is concerned.

Come to think of it... maybe I should apply for that job. ;-)

sherm--

If you listen to a UNIX shell, can you hear the C?
_______________________________________________
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:
    • (That Obj-C/Java Req -- Re: Jobs) - Java GUIs
      • From: Pete Carss <email@hidden>
References: 
 >Re: That Obj-C/Java Req -- Re: Jobs (From: Eric Wang <email@hidden>)

  • Prev by Date: Re: That Obj-C/Java Req -- Re: Jobs
  • Next by Date: Re: If Object-C is "the" language, then why is no one using it?
  • Previous by thread: Re: That Obj-C/Java Req -- Re: Jobs
  • Next by thread: (That Obj-C/Java Req -- Re: Jobs) - Java GUIs
  • Index(es):
    • Date
    • Thread