Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6960627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:25:33+00:00 2026-05-27T15:25:33+00:00

Possible Duplicate: Objective C message dispatch mechanism My question IS NOT about the syntax.

  • 0

Possible Duplicate:
Objective C message dispatch mechanism

My question IS NOT about the syntax. I’d like to learn how is calling a method in C++ different from sending a message to an object in Objective-C and how they are performed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:25:34+00:00Added an answer on May 27, 2026 at 3:25 pm

    This is quite a complicated question, as there is no fix C++ calling convetion unlike C.

    Objective-C is just a thin wrapper around C, so it uses the same convention.
    Just one additional thing to now, when you send a message like:

    [target selector];
    

    It is the same as:

    objc_msgSend(target, @selector(selector));
    

    Then it’s just the traditional C calling convention, with a first table lookup for the function matching your message. The objc_msgSend is a bit more complicated as it keeps the arguments stack in place and pass it directly to the underlying function.

    The C++ calling convention differs from one name-mangling to another, and even from one compiler to another.

    From a performance point of view, C++ method call is faster as the link is resolved at compile-time (more exactly at link-time). The method either exists or not, which cause a linker error.

    Objective-C method call include a method table lookup at runtime, thus your method may be added later in your code, which gives more flexibility but less performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Method overloading in Objective-C? Is method overloading not possible. I have two
Possible Duplicate: Method Syntax in Objective C So I totally get the more common
Possible Duplicate: Calling Python from Objective-C I'm a long-time Python programmer and short-time Cocoa
Possible Duplicate: Global int variable objective c I would like to create a global
Possible Duplicate: Convert string to float in Objective-C I'd like to convert a string
Possible Duplicate: Objective C for Windows I know there are several posts about this
Possible Duplicate: Caret in objective C What does this ^ syntax mean in Objective-C?
Possible Duplicate: How to learn C and Objective-C I'm looking for recommendations for good
Possible Duplicate: Objective C multiple inheritance Hi, Objective C does not support multiple inheritance.
Possible Duplicate: Style: Dot notation vs. message notation in Objective-C 2.0 In objective-C, you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.