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 7050823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:11:27+00:00 2026-05-28T03:11:27+00:00

I am creating S4 classes in R. I read in https://github.com/hadley/devtools/wiki/S4 Note that S4

  • 0

I am creating S4 classes in R.

I read in https://github.com/hadley/devtools/wiki/S4

Note that S4 supports multiple inheritance, but this should be used
with extreme caution as it makes method lookup extremely complicated.

What is method lookup and why is it more complex with multiple inheritance?

  • 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-28T03:11:27+00:00Added an answer on May 28, 2026 at 3:11 am

    When you type f(x), with x belonging to several classes (say, A, B and C), the computer has to decide which f method to call (that from class A, B, or C): this is called “method lookup”.

    Multiple inheritance often poses problems when the code evolves.

    Imagine you have written two base classes A and B, and class C inherits from both. Everything works fine.
    A few months later, a developer, who uses class A, and is completely unaware of classes B and C (he does not need them), adds a new method to class A. Unbeknownst to him, there is already a method with the same name in class B. What happens to objects of class C? Will the method from A or B be used? In some languages, the code may fail, in others you can have an undefined behaviour and a very hard-to-catch bug.

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

Sidebar

Related Questions

I know that there are people out there creating classes for this (ie http://coreyoneil.com/portfolio/index.php?project=5
While creating classes in Java I often find myself creating instance-level collections that I
I have a source code that is needed to be converted by creating classes,
I'm creating interfaces and abstract classes that represent a messaging framework for short text-based
I'm creating a simple API that creates typed classes based on JSON data that
When using custom classes with read-only properties that are of type List or similar
I have a multi-threaded Delphi program creating multiple instance of some classes, and I
I have the following issue. I have two classes that manipulate information but they
I'm creating an application in C# 3.5 that uses the AutoCAD API to read
I don't know how interface works for my problem but I have read that

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.