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

  • SEARCH
  • Home
  • 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 7577287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:08:47+00:00 2026-05-30T17:08:47+00:00

The question is from a comment I just added to the answer to this

  • 0

The question is from a comment I just added to the answer to this question, but it shouldn’t be a duplicate.

The answer from @Bavarious to that question makes sense to me, but I am still confused why the runtime can not bind the method to the right object even the object is an id? to my understanding, dynamic binding or dynamic typing is that the compiler has no way of knowing what object behind an id, but the runtime is supposed to know that and choose the right object as the receiver of the message. but why the runtime can’t do that?

  • 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-30T17:08:48+00:00Added an answer on May 30, 2026 at 5:08 pm

    Short answer: C.

    Expansion: When the compiler generates a call to a method, it is really just generating a call to a C function — to objc_msgSend() or variant therein — that dynamically binds and dispatches the method.

    Because the C ABI runs “at the metal” (pretty close), the way that arguments and return values are passed can change dramatically based on the type. For example, the compiler can pass anything up to 32 bits in size in a register (or 64 bits in some architectures), but anything larger will be on the stack itself.

    Because of this, the compiler can’t necessarily emit a generic bit of assembly to call objc_msgSend() — to dispatch the method call — through (id) as the different signatures — the different argument types to the method — may require different code generation.

    Now, technically, the compiler could generate the same code for many cases, but it chooses to take a conservative policy and complain. In particular, the assumption is that if you have 2 conflicting typed declarations, there may be others and reminding you that having a method of the same name with different argument types is extremely strongly discouraged.

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

Sidebar

Related Questions

So in a comment from another question , I just saw this example for
This question arose from the discussion in the comments of this answer . First,
I've forked this question from a similar question I made in a comment I
First question from me; I'm currently fixing a graphing service that uses XSLFO to
So I got this question from one of the developers in my team: What
This is a continuation question from a previous question I have asked I now
I'm writing this question from the standpoint of an ASP.NET application. However I realize
I am asking this question from an educational/hacking point of view, (I wouldn't really
I got this question from this discussion . A method call like object.m does
In the answer to this question on the kiln stack exchange site, there is

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.