Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why does inheritance even exist?

Why does inheritance even exist?

Scheduled Pinned Locked Moved The Lounge
oopquestioncomhelp
10 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joshua Tully
    wrote on last edited by
    #1

    Source: http://www.codeproject.com/Answers/80124/Problem-regarding-confilcting-Class-names.aspx#answer1[^] Important Quote: Thanks for answering, i got your point. But in my case, B.Bar doesn't inherit A.Base. Both A and B have totally different implementations and don't reference each other. But both provides same functionality, same methods, same properties. So, i want to use functionality of both namespaces without creating different objects for their classes. Am I not the only one who's thinking "Polymorphism and Programming to an interface?" (http://msdn.microsoft.com/en-us/library/aa260635%28VS.60%29.aspx[^])

    P C P M 4 Replies Last reply
    0
    • J Joshua Tully

      Source: http://www.codeproject.com/Answers/80124/Problem-regarding-confilcting-Class-names.aspx#answer1[^] Important Quote: Thanks for answering, i got your point. But in my case, B.Bar doesn't inherit A.Base. Both A and B have totally different implementations and don't reference each other. But both provides same functionality, same methods, same properties. So, i want to use functionality of both namespaces without creating different objects for their classes. Am I not the only one who's thinking "Polymorphism and Programming to an interface?" (http://msdn.microsoft.com/en-us/library/aa260635%28VS.60%29.aspx[^])

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Josh_Jackson wrote:

      Am I not the only one who's thinking

      Ignoring the implicit double negative in my reply, no you aren't the only one who thinks he should code to the interface.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      M 1 Reply Last reply
      0
      • J Joshua Tully

        Source: http://www.codeproject.com/Answers/80124/Problem-regarding-confilcting-Class-names.aspx#answer1[^] Important Quote: Thanks for answering, i got your point. But in my case, B.Bar doesn't inherit A.Base. Both A and B have totally different implementations and don't reference each other. But both provides same functionality, same methods, same properties. So, i want to use functionality of both namespaces without creating different objects for their classes. Am I not the only one who's thinking "Polymorphism and Programming to an interface?" (http://msdn.microsoft.com/en-us/library/aa260635%28VS.60%29.aspx[^])

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        "C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste)" -- fat_boy :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        1 Reply Last reply
        0
        • J Joshua Tully

          Source: http://www.codeproject.com/Answers/80124/Problem-regarding-confilcting-Class-names.aspx#answer1[^] Important Quote: Thanks for answering, i got your point. But in my case, B.Bar doesn't inherit A.Base. Both A and B have totally different implementations and don't reference each other. But both provides same functionality, same methods, same properties. So, i want to use functionality of both namespaces without creating different objects for their classes. Am I not the only one who's thinking "Polymorphism and Programming to an interface?" (http://msdn.microsoft.com/en-us/library/aa260635%28VS.60%29.aspx[^])

          P Offline
          P Offline
          peterchen
          wrote on last edited by
          #4

          Josh_Jackson wrote:

          Why does inheritance even exist?

          Um, because it helps making better blinkenlights?

          Agh! Reality! My Archnemesis![^]
          | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

          1 Reply Last reply
          0
          • P Pete OHanlon

            Josh_Jackson wrote:

            Am I not the only one who's thinking

            Ignoring the implicit double negative in my reply, no you aren't the only one who thinks he should code to the interface.

            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

            My blog | My articles | MoXAML PowerToys | Onyx

            M Offline
            M Offline
            Mark_Wallace
            wrote on last edited by
            #5

            Pete O'Hanlon wrote:

            Ignoring the implicit double negative in my reply

            ??? Wither the double negative? "No" is a reply to the question, and "aren't" is the main verb of a separate clause. The only step required for perfection would be the addition of a comma to separate the clauses.

            I wanna be a eunuchs developer! Pass me a bread knife!

            P 1 Reply Last reply
            0
            • M Mark_Wallace

              Pete O'Hanlon wrote:

              Ignoring the implicit double negative in my reply

              ??? Wither the double negative? "No" is a reply to the question, and "aren't" is the main verb of a separate clause. The only step required for perfection would be the addition of a comma to separate the clauses.

              I wanna be a eunuchs developer! Pass me a bread knife!

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              The "implicit" referred to the OP using "not" and my reply being "no".

              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

              My blog | My articles | MoXAML PowerToys | Onyx

              M 1 Reply Last reply
              0
              • P Pete OHanlon

                The "implicit" referred to the OP using "not" and my reply being "no".

                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                My blog | My articles | MoXAML PowerToys | Onyx

                M Offline
                M Offline
                Mark_Wallace
                wrote on last edited by
                #7

                Pete O'Hanlon wrote:

                The "implicit" referred to the OP using "not" and my reply being "no".

                That's one of the niceties of English -- "Am I A" and "Am I not A" are completely synonymous, when used copularly (i.e. where A is an adjective) because they both state: "Is A a true attribute of the subject of the verb?", and so an honest-to-goodness negator is not being used, hence no double negative (just a difference in stress). There's nothing wrong with double negatives, anyway. It's when they're used by mistake that there's an error -- but it's the mistake that causes the error, not the double negative itself.

                I wanna be a eunuchs developer! Pass me a bread knife!

                L 1 Reply Last reply
                0
                • J Joshua Tully

                  Source: http://www.codeproject.com/Answers/80124/Problem-regarding-confilcting-Class-names.aspx#answer1[^] Important Quote: Thanks for answering, i got your point. But in my case, B.Bar doesn't inherit A.Base. Both A and B have totally different implementations and don't reference each other. But both provides same functionality, same methods, same properties. So, i want to use functionality of both namespaces without creating different objects for their classes. Am I not the only one who's thinking "Polymorphism and Programming to an interface?" (http://msdn.microsoft.com/en-us/library/aa260635%28VS.60%29.aspx[^])

                  M Offline
                  M Offline
                  Marc Clifton
                  wrote on last edited by
                  #8

                  Josh_Jackson wrote:

                  Both A and B have totally different implementations and don't reference each other. But both provides same functionality, same methods, same properties.

                  Uh. Am I the only that doesn't understand how they can be different and yet the same? Marc

                  I 1 Reply Last reply
                  0
                  • M Marc Clifton

                    Josh_Jackson wrote:

                    Both A and B have totally different implementations and don't reference each other. But both provides same functionality, same methods, same properties.

                    Uh. Am I the only that doesn't understand how they can be different and yet the same? Marc

                    I Offline
                    I Offline
                    Ian Shlasko
                    wrote on last edited by
                    #9

                    Two different versions of the same third-party library... He clarified it in comments. He's trying to support both... It'd actually be a reasonable question if he'd explained that right at the start... As is, it looks like Comp Sci 101.

                    Proud to have finally moved to the A-Ark. Which one are you in?
                    Author of the Guardians Saga (Sci-Fi/Fantasy novels)

                    1 Reply Last reply
                    0
                    • M Mark_Wallace

                      Pete O'Hanlon wrote:

                      The "implicit" referred to the OP using "not" and my reply being "no".

                      That's one of the niceties of English -- "Am I A" and "Am I not A" are completely synonymous, when used copularly (i.e. where A is an adjective) because they both state: "Is A a true attribute of the subject of the verb?", and so an honest-to-goodness negator is not being used, hence no double negative (just a difference in stress). There's nothing wrong with double negatives, anyway. It's when they're used by mistake that there's an error -- but it's the mistake that causes the error, not the double negative itself.

                      I wanna be a eunuchs developer! Pass me a bread knife!

                      L Offline
                      L Offline
                      Luc Pattyn
                      wrote on last edited by
                      #10

                      Mark Wallace wrote:

                      it's the mistake that causes the error, not the double negative itself

                      you're absolutely positively not wrong here. :)

                      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                      If you want my opinion or comment, ask in a forum or on my profile page; I will not participate in frackin' Q&A


                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups