• 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: Cocoa from C++ (dont want to mix it)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa from C++ (dont want to mix it)


  • Subject: Re: Cocoa from C++ (dont want to mix it)
  • From: John Stiles <email@hidden>
  • Date: Thu, 10 Mar 2005 06:37:17 -0800

C++ doesn't support the dynamic typing and message passing that Objective-C does.
There really isn't a way to do message passing with C++ syntax.
For example, say I have:
id myObject;
... set up myObject here ...
[id doSomeFunkySelector:10];


In C++, the compiler needs to know about the function ahead of time, or it simply can't compile it.
In Objective-C, you can just call whatever and the system will either figure it out and do the right thing at runtime, or throw an exception if it can't be done.
There really isn't a way to meld static and dynamic binding.



On Mar 10, 2005, at 2:13 AM, Dominik wrote:

I did a search on google and DONT want to mix C++ and ObjectC but to replace it.

On Mar 10, 2005, at 8:56 AM, j o a r wrote:


On 2005-03-10, at 08.45, Dominik wrote:

What hinders me from using C++ for cocoa programming?
The Byte-Code is the same and the headers could be translated.
[] msgs could be calls to ObjC_SendMsg or what its called. If gcc couldnt be convinced to interpret [] in c++ just fine.

<http://www.google.com/search?client=safari&rls=en-us&q=Objective- C++&ie=UTF-8&oe=UTF-8>


<http://developer.apple.com/documentation/Cocoa/Conceptual/ ObjectiveC/LanguageOverview/chapter_3_section_10.html>

et.c.

j o a r


May you always find water and shade (WoT)
Dominik

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Cocoa from C++ (From: Dominik <email@hidden>)
 >Re: Cocoa from C++ (From: j o a r <email@hidden>)
 >Re: Cocoa from C++ (dont want to mix it) (From: Dominik <email@hidden>)

  • Prev by Date: Re: AuthorizationExecuteWithPrivileges(): implementation bug or correct behavior?
  • Next by Date: Re: Need help tracking down memory issue
  • Previous by thread: Re: Cocoa from C++ (dont want to mix it)
  • Next by thread: Re: Cocoa from C++ (dont want to mix it)
  • Index(es):
    • Date
    • Thread