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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Why I hate C#

Why I hate C#

Scheduled Pinned Locked Moved C#
csharpc++designhelpquestion
35 Posts 11 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.
  • S Skippums

    Prior to spending the last eight months using C#, life was good in the land of C++. I could use pointers without explicitly sharing that fact with the compiler. Implementing a Bus class that inherits from both GroundVehicle and PublicTransport was a non-issue. And of course, I could declare a method with thirty-two overloads in one definition using default parameters. The latest headache that I have encountered in C# is the removal of the ever useful typedef. Why is it that a new language, birthed from a great language like C++, would restrict its users by removing some of the most usefull features of the language? Did the designers of C# feel that code reuse is better left in the past because programming was becoming too convenient? Why is it that now, during the code design phase of an application, when I don't know whether I will be using an int, string, long, etc. for a unique identifier, can I not either (1) typedef a class "UniqueIdentifier" to int for now, so it can easily be changed EVERYWHERE later, or (2) create a class "UniqueIdentifier" that inherits from int, which would essentially typedef it as in (1)? Instead I have to guess which one I will end up using, then go through my code line by line in two months and find every single occurance of that type, then change it to whatever it should be. The only other alternative is to REIMPLEMENT the int class, which is a complete waste of my time. This lack of convenience perplexes and frustrates me to no end. I am also disappointed that an interface member who returns void (nothing) cannot be implemented by a method that returns some other type. Oh well, I guess that I will have to start implementing my own compiler so I don't have to put up with the lack of thought and foresight by the "greatest minds" in our field. Jeff

    A Offline
    A Offline
    Anthony Mushrow
    wrote on last edited by
    #2

    To set in your ways with C++ eh? They are different languages, they both have their strengths and weaknesses. As for C# i actually find it quite good, and multiple inheritance, well, what can i say. A little actually, i don't wish it was there, it can be a bit of a hack some... alot of the time. You just have to use a different method than your used to, to acheive what you want.

    My current favourite word is: PIE! I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for. -The Undefeated

    C S 2 Replies Last reply
    0
    • S Skippums

      Prior to spending the last eight months using C#, life was good in the land of C++. I could use pointers without explicitly sharing that fact with the compiler. Implementing a Bus class that inherits from both GroundVehicle and PublicTransport was a non-issue. And of course, I could declare a method with thirty-two overloads in one definition using default parameters. The latest headache that I have encountered in C# is the removal of the ever useful typedef. Why is it that a new language, birthed from a great language like C++, would restrict its users by removing some of the most usefull features of the language? Did the designers of C# feel that code reuse is better left in the past because programming was becoming too convenient? Why is it that now, during the code design phase of an application, when I don't know whether I will be using an int, string, long, etc. for a unique identifier, can I not either (1) typedef a class "UniqueIdentifier" to int for now, so it can easily be changed EVERYWHERE later, or (2) create a class "UniqueIdentifier" that inherits from int, which would essentially typedef it as in (1)? Instead I have to guess which one I will end up using, then go through my code line by line in two months and find every single occurance of that type, then change it to whatever it should be. The only other alternative is to REIMPLEMENT the int class, which is a complete waste of my time. This lack of convenience perplexes and frustrates me to no end. I am also disappointed that an interface member who returns void (nothing) cannot be implemented by a method that returns some other type. Oh well, I guess that I will have to start implementing my own compiler so I don't have to put up with the lack of thought and foresight by the "greatest minds" in our field. Jeff

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #3

      If you don't like it, then why program in C#?

      "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

      S 1 Reply Last reply
      0
      • S Skippums

        Prior to spending the last eight months using C#, life was good in the land of C++. I could use pointers without explicitly sharing that fact with the compiler. Implementing a Bus class that inherits from both GroundVehicle and PublicTransport was a non-issue. And of course, I could declare a method with thirty-two overloads in one definition using default parameters. The latest headache that I have encountered in C# is the removal of the ever useful typedef. Why is it that a new language, birthed from a great language like C++, would restrict its users by removing some of the most usefull features of the language? Did the designers of C# feel that code reuse is better left in the past because programming was becoming too convenient? Why is it that now, during the code design phase of an application, when I don't know whether I will be using an int, string, long, etc. for a unique identifier, can I not either (1) typedef a class "UniqueIdentifier" to int for now, so it can easily be changed EVERYWHERE later, or (2) create a class "UniqueIdentifier" that inherits from int, which would essentially typedef it as in (1)? Instead I have to guess which one I will end up using, then go through my code line by line in two months and find every single occurance of that type, then change it to whatever it should be. The only other alternative is to REIMPLEMENT the int class, which is a complete waste of my time. This lack of convenience perplexes and frustrates me to no end. I am also disappointed that an interface member who returns void (nothing) cannot be implemented by a method that returns some other type. Oh well, I guess that I will have to start implementing my own compiler so I don't have to put up with the lack of thought and foresight by the "greatest minds" in our field. Jeff

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #4

        Why not learn C# instead of trying to make it be C++ ? As most types are passed by reference, you essentially have pointers. You should probably clean up your design before you start coding. You can't define a class derived from a value type. I wonder if you can derive a class from an int?, I don't know. But, you can define a class which exposes the Id and change the type in there if you want. I agree that it sucks that we don't have optional parameters. The C# team is caught up in worrying about how to impliment named parameters, although I've told them that just C++ style would be fine.

        Skippums wrote:

        I am also disappointed that an interface member who returns void (nothing) cannot be implemented by a method that returns some other type.

        You can't differentiate a method by return type in C++, either.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        J S 2 Replies Last reply
        0
        • A Anthony Mushrow

          To set in your ways with C++ eh? They are different languages, they both have their strengths and weaknesses. As for C# i actually find it quite good, and multiple inheritance, well, what can i say. A little actually, i don't wish it was there, it can be a bit of a hack some... alot of the time. You just have to use a different method than your used to, to acheive what you want.

          My current favourite word is: PIE! I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for. -The Undefeated

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #5

          Multiple inheritance rocks. It's not the compilers fault if some peope who mis-use it are morons.

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          S 1 Reply Last reply
          0
          • C Christian Graus

            Multiple inheritance rocks. It's not the compilers fault if some peope who mis-use it are morons.

            Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            S Offline
            S Offline
            Skippums
            wrote on last edited by
            #6

            I concur. People misuse all kinds of things incorrectly when coding (and in life) even though they are extremely useful. It is because of the tools usefulness that leads to the ability to misuse it. Maybe next they will eliminate Goto statements. Jeff

            1 Reply Last reply
            0
            • A Anthony Mushrow

              To set in your ways with C++ eh? They are different languages, they both have their strengths and weaknesses. As for C# i actually find it quite good, and multiple inheritance, well, what can i say. A little actually, i don't wish it was there, it can be a bit of a hack some... alot of the time. You just have to use a different method than your used to, to acheive what you want.

              My current favourite word is: PIE! I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for. -The Undefeated

              S Offline
              S Offline
              Skippums
              wrote on last edited by
              #7

              Yeah, but the different method to acheive what I want is to REIMPLEMENT the IDENTICAL code! I chose the word identical on purpose; I am not doing something similar, it is the same. Both an airplane and a bus have attributes like number of seats, required crew members, lavatories, tire count, etc., but they also have other attributes they share with other things like taillights for the bus, which the plane doesn't have. Reimplementing the SAME thing over and over again is such a waste of my time! Don't get me wrong, there are some things about C# that are good, like the generic template types, template parameter constraints, built-in collections, more intuitive coding (lets face it, most people don't understand pointers), strong typing of enums, and cleaner more readable code. But I simply don't understand why some of the best parts of other languages were simply not included. Jeff

              J C 2 Replies Last reply
              0
              • S Skippums

                Prior to spending the last eight months using C#, life was good in the land of C++. I could use pointers without explicitly sharing that fact with the compiler. Implementing a Bus class that inherits from both GroundVehicle and PublicTransport was a non-issue. And of course, I could declare a method with thirty-two overloads in one definition using default parameters. The latest headache that I have encountered in C# is the removal of the ever useful typedef. Why is it that a new language, birthed from a great language like C++, would restrict its users by removing some of the most usefull features of the language? Did the designers of C# feel that code reuse is better left in the past because programming was becoming too convenient? Why is it that now, during the code design phase of an application, when I don't know whether I will be using an int, string, long, etc. for a unique identifier, can I not either (1) typedef a class "UniqueIdentifier" to int for now, so it can easily be changed EVERYWHERE later, or (2) create a class "UniqueIdentifier" that inherits from int, which would essentially typedef it as in (1)? Instead I have to guess which one I will end up using, then go through my code line by line in two months and find every single occurance of that type, then change it to whatever it should be. The only other alternative is to REIMPLEMENT the int class, which is a complete waste of my time. This lack of convenience perplexes and frustrates me to no end. I am also disappointed that an interface member who returns void (nothing) cannot be implemented by a method that returns some other type. Oh well, I guess that I will have to start implementing my own compiler so I don't have to put up with the lack of thought and foresight by the "greatest minds" in our field. Jeff

                J Offline
                J Offline
                Jeffrey Walton
                wrote on last edited by
                #8

                Hi Jeff, I know the feeling.... I like the abuse available to me using C++, and the slop availble to me using Visual Basic. C# seems to be a bastard child - strongly typed where everything can be a battle - no abuse or slop. Jeff

                1 Reply Last reply
                0
                • P Paul Conrad

                  If you don't like it, then why program in C#?

                  "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                  S Offline
                  S Offline
                  Skippums
                  wrote on last edited by
                  #9

                  I do what my boss tells me to do. Besides, it IS good for readability and maintanence. Jeff

                  P 1 Reply Last reply
                  0
                  • S Skippums

                    Yeah, but the different method to acheive what I want is to REIMPLEMENT the IDENTICAL code! I chose the word identical on purpose; I am not doing something similar, it is the same. Both an airplane and a bus have attributes like number of seats, required crew members, lavatories, tire count, etc., but they also have other attributes they share with other things like taillights for the bus, which the plane doesn't have. Reimplementing the SAME thing over and over again is such a waste of my time! Don't get me wrong, there are some things about C# that are good, like the generic template types, template parameter constraints, built-in collections, more intuitive coding (lets face it, most people don't understand pointers), strong typing of enums, and cleaner more readable code. But I simply don't understand why some of the best parts of other languages were simply not included. Jeff

                    J Offline
                    J Offline
                    Jeffrey Walton
                    wrote on last edited by
                    #10

                    Skippums wrote:

                    Reimplementing the SAME thing over and over again is such a waste of my time!

                    C# does lend itself to a deep inheritance heirarchy... Then you get into Tweety the Penguin syndrome: Base Class of Birds. Birds Fly. Penguins are birds, but Penguins don't fly. Time for another pair of shim classes - BirdsThatFly{ }, and BirdsThatDontFly{ }.

                    1 Reply Last reply
                    0
                    • S Skippums

                      Yeah, but the different method to acheive what I want is to REIMPLEMENT the IDENTICAL code! I chose the word identical on purpose; I am not doing something similar, it is the same. Both an airplane and a bus have attributes like number of seats, required crew members, lavatories, tire count, etc., but they also have other attributes they share with other things like taillights for the bus, which the plane doesn't have. Reimplementing the SAME thing over and over again is such a waste of my time! Don't get me wrong, there are some things about C# that are good, like the generic template types, template parameter constraints, built-in collections, more intuitive coding (lets face it, most people don't understand pointers), strong typing of enums, and cleaner more readable code. But I simply don't understand why some of the best parts of other languages were simply not included. Jeff

                      C Offline
                      C Offline
                      Colin Angus Mackay
                      wrote on last edited by
                      #11

                      Skippums wrote:

                      taillights for the bus, which the plane doesn't have

                      I thought planes did have tail lights. Isn't that where the term comes from?


                      Upcoming FREE developer events: * Developer Day Scotland My website

                      S 1 Reply Last reply
                      0
                      • C Christian Graus

                        Why not learn C# instead of trying to make it be C++ ? As most types are passed by reference, you essentially have pointers. You should probably clean up your design before you start coding. You can't define a class derived from a value type. I wonder if you can derive a class from an int?, I don't know. But, you can define a class which exposes the Id and change the type in there if you want. I agree that it sucks that we don't have optional parameters. The C# team is caught up in worrying about how to impliment named parameters, although I've told them that just C++ style would be fine.

                        Skippums wrote:

                        I am also disappointed that an interface member who returns void (nothing) cannot be implemented by a method that returns some other type.

                        You can't differentiate a method by return type in C++, either.

                        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                        J Offline
                        J Offline
                        Jeffrey Walton
                        wrote on last edited by
                        #12

                        Christian Graus wrote:

                        Why not learn C# instead of trying to make it be C++ ?

                        Chrisitian is correct. Gossling tried similar when writing the Java compiler. He tried to adapt a C++ compiler, finding it did not work well. He then wrote the compiler from scratch. Jeff

                        1 Reply Last reply
                        0
                        • S Skippums

                          Prior to spending the last eight months using C#, life was good in the land of C++. I could use pointers without explicitly sharing that fact with the compiler. Implementing a Bus class that inherits from both GroundVehicle and PublicTransport was a non-issue. And of course, I could declare a method with thirty-two overloads in one definition using default parameters. The latest headache that I have encountered in C# is the removal of the ever useful typedef. Why is it that a new language, birthed from a great language like C++, would restrict its users by removing some of the most usefull features of the language? Did the designers of C# feel that code reuse is better left in the past because programming was becoming too convenient? Why is it that now, during the code design phase of an application, when I don't know whether I will be using an int, string, long, etc. for a unique identifier, can I not either (1) typedef a class "UniqueIdentifier" to int for now, so it can easily be changed EVERYWHERE later, or (2) create a class "UniqueIdentifier" that inherits from int, which would essentially typedef it as in (1)? Instead I have to guess which one I will end up using, then go through my code line by line in two months and find every single occurance of that type, then change it to whatever it should be. The only other alternative is to REIMPLEMENT the int class, which is a complete waste of my time. This lack of convenience perplexes and frustrates me to no end. I am also disappointed that an interface member who returns void (nothing) cannot be implemented by a method that returns some other type. Oh well, I guess that I will have to start implementing my own compiler so I don't have to put up with the lack of thought and foresight by the "greatest minds" in our field. Jeff

                          J Offline
                          J Offline
                          Judah Gabriel Himango
                          wrote on last edited by
                          #13

                          As a former C++ guy myself who still dabbles, I heartily disagree. While it would be nice to have certain C++ features in C#, some aren't there for a good reason. Sometimes you have to step back and look at those reasons, instead of ignoring them and cursing the compiler or language. By the statements and questions you posed, I also suspect you haven't explored all C# has to offer. Learn the ropes before cursing it, you'll be surprised to find C# to be a beautiful, elegant language. Now if you're really interested in answers to your questions, I'd be glad to answer them. But I suspect this was more a rant than a Q & A, yes?

                          Skippums wrote:

                          Oh well, I guess that I will have to start implementing my own compiler so I don't have to put up with the lack of thought and foresight by the "greatest minds" in our field.

                          Blasphemy! ;) Just kidding. Seriously though, the folks that designed the C# language are smart, smart folks. Anders Hejlsberg, the lead architect, also designed Turbo Pascal way back in the day, which became a smash success. The man is a seriously smart guy. No offense, but I honestly think everyone in this forum doesn't approach his wits when it comes to language design.

                          Tech, life, family, faith: Give me a visit. I'm currently blogging about: The Story of the Spoiled Child The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

                          S 1 Reply Last reply
                          0
                          • C Christian Graus

                            Why not learn C# instead of trying to make it be C++ ? As most types are passed by reference, you essentially have pointers. You should probably clean up your design before you start coding. You can't define a class derived from a value type. I wonder if you can derive a class from an int?, I don't know. But, you can define a class which exposes the Id and change the type in there if you want. I agree that it sucks that we don't have optional parameters. The C# team is caught up in worrying about how to impliment named parameters, although I've told them that just C++ style would be fine.

                            Skippums wrote:

                            I am also disappointed that an interface member who returns void (nothing) cannot be implemented by a method that returns some other type.

                            You can't differentiate a method by return type in C++, either.

                            Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                            S Offline
                            S Offline
                            Skippums
                            wrote on last edited by
                            #14

                            I don't want it to be C++... C++ can be EXTREMELY cryptic. I like MOST of the usability of C#, but the lack of multiple inheritence and typedef'ing is incomprehensible to me (I don't like the unsafe keyword, but I agree with why they included it). I also know that my suggestion on returning something instead of void has yet to be implemented in ANY language that I am aware of, but I don't see why it is not allowed, since it would be easy to implement in the compiler. I just expected that a new language would go the extra mile and give me more flexibility, instead of restricting me so much that I am spending about a tenth of my time jumping through hoops to trick the language into working how I need it to. As far as your suggestion, "You should probably clean up your design before you start coding", I completely disagree. The type of variable I use for UniqueId should be COMPLETELY decoupled from the class. I shouldn't need to know it's type at all anywhere within the class, and in doing so I strongly couple the implementation of my classes to a particular type. NOT cool! Oh yeah, and I forgot one more caveat that I find mildly troubling. If I have class A in namespace NA, and class B in namespace NB which inherits from class A, to include class B I am forced to say that I am using namespace NA, despite no reference to NA in my code where I only use class B! This may be to simplify the design of the compiler, and it doesn't reduce my ability to code at all, but it is kind of anoying and unexpected. Jeff

                            C 1 Reply Last reply
                            0
                            • J Judah Gabriel Himango

                              As a former C++ guy myself who still dabbles, I heartily disagree. While it would be nice to have certain C++ features in C#, some aren't there for a good reason. Sometimes you have to step back and look at those reasons, instead of ignoring them and cursing the compiler or language. By the statements and questions you posed, I also suspect you haven't explored all C# has to offer. Learn the ropes before cursing it, you'll be surprised to find C# to be a beautiful, elegant language. Now if you're really interested in answers to your questions, I'd be glad to answer them. But I suspect this was more a rant than a Q & A, yes?

                              Skippums wrote:

                              Oh well, I guess that I will have to start implementing my own compiler so I don't have to put up with the lack of thought and foresight by the "greatest minds" in our field.

                              Blasphemy! ;) Just kidding. Seriously though, the folks that designed the C# language are smart, smart folks. Anders Hejlsberg, the lead architect, also designed Turbo Pascal way back in the day, which became a smash success. The man is a seriously smart guy. No offense, but I honestly think everyone in this forum doesn't approach his wits when it comes to language design.

                              Tech, life, family, faith: Give me a visit. I'm currently blogging about: The Story of the Spoiled Child The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

                              S Offline
                              S Offline
                              Skippums
                              wrote on last edited by
                              #15

                              If you know why they didn't include multiple inheritence and typedef'ing, I would be very interested in hearing (or reading) it. Jeff

                              A C J 3 Replies Last reply
                              0
                              • S Skippums

                                If you know why they didn't include multiple inheritence and typedef'ing, I would be very interested in hearing (or reading) it. Jeff

                                A Offline
                                A Offline
                                Anthony Mushrow
                                wrote on last edited by
                                #16

                                Maybe they where just copying off java on that one. C# is more of a mix between java and c++ than a direct upgrade from c++.

                                My current favourite word is: PIE! I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for. -The Undefeated

                                P 1 Reply Last reply
                                0
                                • S Skippums

                                  I don't want it to be C++... C++ can be EXTREMELY cryptic. I like MOST of the usability of C#, but the lack of multiple inheritence and typedef'ing is incomprehensible to me (I don't like the unsafe keyword, but I agree with why they included it). I also know that my suggestion on returning something instead of void has yet to be implemented in ANY language that I am aware of, but I don't see why it is not allowed, since it would be easy to implement in the compiler. I just expected that a new language would go the extra mile and give me more flexibility, instead of restricting me so much that I am spending about a tenth of my time jumping through hoops to trick the language into working how I need it to. As far as your suggestion, "You should probably clean up your design before you start coding", I completely disagree. The type of variable I use for UniqueId should be COMPLETELY decoupled from the class. I shouldn't need to know it's type at all anywhere within the class, and in doing so I strongly couple the implementation of my classes to a particular type. NOT cool! Oh yeah, and I forgot one more caveat that I find mildly troubling. If I have class A in namespace NA, and class B in namespace NB which inherits from class A, to include class B I am forced to say that I am using namespace NA, despite no reference to NA in my code where I only use class B! This may be to simplify the design of the compiler, and it doesn't reduce my ability to code at all, but it is kind of anoying and unexpected. Jeff

                                  C Offline
                                  C Offline
                                  Christian Graus
                                  wrote on last edited by
                                  #17

                                  Skippums wrote:

                                  I just expected that a new language would go the extra mile and give me more flexibility, instead of restricting me so much that I am spending about a tenth of my time jumping through hoops to trick the language into working how I need it to.

                                  What you mean is, you expect a new language to work like the old one. C# is a new language. I went through the same pain, at first I tried to make C# be c++ and it did not work. Now I understand the differences, I know both have limitations, but I am used to working within each of them. I like C#.

                                  Skippums wrote:

                                  As far as your suggestion, "You should probably clean up your design before you start coding", I completely disagree.

                                  If you want to decouple something as basic as the nature of an Id, then do it via a class, that makes sense to me.

                                  Skippums wrote:

                                  If I have class A in namespace NA, and class B in namespace NB which inherits from class A, to include class B I am forced to say that I am using namespace NA

                                  Yeah, there's no auto namespace lookup. I agree that would be nice, but for every C++ person who expects it, there are 20 who would be troubled to see the namespace imported automatically.

                                  Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                                  1 Reply Last reply
                                  0
                                  • S Skippums

                                    If you know why they didn't include multiple inheritence and typedef'ing, I would be very interested in hearing (or reading) it. Jeff

                                    C Offline
                                    C Offline
                                    Christian Graus
                                    wrote on last edited by
                                    #18

                                    typedefs are plain ugly. They are a holdover from C, I thought. multiple inheritance was not included probably because the design focus of C# is to make it hard to hurt yourself using it. I disagree with them, but that is their focus.

                                    Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                                    S P A 3 Replies Last reply
                                    0
                                    • C Colin Angus Mackay

                                      Skippums wrote:

                                      taillights for the bus, which the plane doesn't have

                                      I thought planes did have tail lights. Isn't that where the term comes from?


                                      Upcoming FREE developer events: * Developer Day Scotland My website

                                      S Offline
                                      S Offline
                                      Skippums
                                      wrote on last edited by
                                      #19

                                      They have an anticollision beacon (the bright red flashing light on top and bottom), running lights (the red and green on the front wingtips, white on the back of the plane), and a landing light or lights. I would consider none of those to be taillights that could be shared with those of a road vehicle, and therefore they should not appear in the airplane class. Regardless, if we ignore semantics and focus on the point, we can see that there are some things that can be categorized in a multitude of ways, and my contention is that an object-oriented language should be able to model that reality, and further, that it should be able to be modeled without any redundancy in code. Jeff -- modified at 19:43 Wednesday 28th November, 2007

                                      1 Reply Last reply
                                      0
                                      • C Christian Graus

                                        typedefs are plain ugly. They are a holdover from C, I thought. multiple inheritance was not included probably because the design focus of C# is to make it hard to hurt yourself using it. I disagree with them, but that is their focus.

                                        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                                        S Offline
                                        S Offline
                                        Skippums
                                        wrote on last edited by
                                        #20

                                        I agree that they CAN be ugly, but all I want is to do something like, "typedef UniqueId as int;", so anywhere I put the word UniqueId, the compiler will know I want it to be an int. I don't understand how strongly coupling my UniqueId property and the integer type within the class is at all helpful. Code maintanance on this is going to be atrocious. Jeff

                                        C L 2 Replies Last reply
                                        0
                                        • S Skippums

                                          I do what my boss tells me to do. Besides, it IS good for readability and maintanence. Jeff

                                          P Offline
                                          P Offline
                                          Paul Conrad
                                          wrote on last edited by
                                          #21

                                          I guess if the boss says so, you have to.

                                          "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                                          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