Java better than C++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #16
    Originally posted by ronverdonk
    I think C and embedded assembler is still the way to do it
    Ronald :cool:
    Great minds think alike. I have no use for anything else.

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #17
      In fact, Bjarne himself says Java inherited C++ features
      That's the point. Not only did it inherit C++ features, but lots of features from other languages.

      Comment

      • Ganon11
        Recognized Expert Specialist
        • Oct 2006
        • 3651

        #18
        HTML beats all. O_o

        Seriously, though, I think it's a matter of preference. I'm only a senior in High School, but I've already learned VB, Java, and C++. I've been learning C++ pretty extensively lately, so I'd say I'd be better at programming using C++. But I remember when learning Java that it seemed more user-friendly - closer to the english language, so concepts were easier to understand. But this is all a matter of preference. As someone already said, 'best' is a relative term. For example, if I were to try and tackle a project with several classes using inheritance, etc, I would use Java, since that makes a lot more sense to me (and I haven't run across unexplained problems in Java like I have in C++). If I were to try and tackle other types of problems, I might use C++, since it is generally faster on my computer and the material (syntax, etc) is still fresh in my head. But would I say any is better than another? No, I don't think I could say that.

        But VB is lame. :P

        Comment

        • Banfa
          Recognized Expert Expert
          • Feb 2006
          • 9067

          #19
          Originally posted by drhowarddrfine
          C is the mother of C++
          More like an older sibling I'd say.

          The latest versions of C have borrowed features from C++, if you look at the development paths of C and C++ you will find that you can just about find a point where they both inherited from the same predecessor but that development is then along separate branches with exchange of ideas happening in both directions between the 2 branches.

          On the occasions when I have used Java I have tended to find it irritating, most recently the most irritating feature was the IDE I was using assuming that it needed to compile everything in the source tree despite some of the files being C++ files, but when I tried to remove those files from it's compile source tree it deleted them from the disk too, where as I wanted them on the disk I just didn't want it to compile them. Sort of "If I can't compile them then no-one can".

          I really really really hate programs that think they are somehow more inteligent then me.

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #20
            I really really really hate programs that think they are somehow more inteligent then me.
            It's why I struggle so with high-level languages. This was years ago but I remember when three of us hardware engineers were told to start writing our code in C. You'd hear these yelps from the other rooms when guys would find pointers and data not winding up where they were supposed to and cries of "I don't have these problems when I write in assembly!"

            Comment

            • r035198x
              MVP
              • Sep 2006
              • 13225

              #21
              Originally posted by Banfa
              More like an older sibling I'd say.

              The latest versions of C have borrowed features from C++, if you look at the development paths of C and C++ you will find that you can just about find a point where they both inherited from the same predecessor but that development is then along separate branches with exchange of ideas happening in both directions between the 2 branches.

              On the occasions when I have used Java I have tended to find it irritating, most recently the most irritating feature was the IDE I was using assuming that it needed to compile everything in the source tree despite some of the files being C++ files, but when I tried to remove those files from it's compile source tree it deleted them from the disk too, where as I wanted them on the disk I just didn't want it to compile them. Sort of "If I can't compile them then no-one can".

              I really really really hate programs that think they are somehow more inteligent then me.
              One day I'll start a thread about these IDEs that have been thrust upon us.
              Unfortunately many beginners are starting out on IDEs these days, practice I think is unhealthy for the programming community.

              Comment

              • drhowarddrfine
                Recognized Expert Expert
                • Sep 2006
                • 7434

                #22
                Agree. Can anyone program in Windows without Visual Studio?

                Comment

                • bartonc
                  Recognized Expert Expert
                  • Sep 2006
                  • 6478

                  #23
                  Originally posted by drhowarddrfine
                  Agree. Can anyone program in Windows without Visual Studio?
                  Yep! With native look and feel using wxPython extentions (wrapper of the C++ wxWidgets) We get free database without MS, too.

                  Comment

                  • bartonc
                    Recognized Expert Expert
                    • Sep 2006
                    • 6478

                    #24
                    Originally posted by bartonc
                    Yep! With native look and feel using wxPython extentions (wrapper of the C++ wxWidgets) We get free database without MS, too.
                    Can anyone else program on Windows without Visual Studio?

                    Comment

                    • Banfa
                      Recognized Expert Expert
                      • Feb 2006
                      • 9067

                      #25
                      Originally posted by bartonc
                      Can anyone else program on Windows without Visual Studio?
                      Yep, I've been writing Windows programs in C since 1989 when it was Windows 2 and before Visual Studio existed.

                      I could very easily write a Windows program making direct API calls using any bog standard text editor if I chose.

                      Comment

                      • drhowarddrfine
                        Recognized Expert Expert
                        • Sep 2006
                        • 7434

                        #26
                        There's two. heh.

                        I've downloaded the console version of VisualC++, I think it's called Visual Toolkit, and played with that. It's the compiler with tools but no gui.

                        I've written a few small apps in assembly for Windows, too. But now I do everything in FreeBSD and have no use for any of that.

                        Comment

                        • bartonc
                          Recognized Expert Expert
                          • Sep 2006
                          • 6478

                          #27
                          Originally posted by Banfa
                          Yep, I've been writing Windows programs in C since 1989 when it was Windows 2 and before Visual Studio existed.

                          I could very easily write a Windows program making direct API calls using any bog standard text editor if I chose.
                          Does "if I chose" mean that this is not really a practical solution, but merely possibility?

                          Comment

                          • drhowarddrfine
                            Recognized Expert Expert
                            • Sep 2006
                            • 7434

                            #28
                            You can, it's just that a lot of people nowadays seem lost unless they have VS. Partly because they have to manage all the files manually or set up another IDE to do so. It's just kind of funny when I see someone ask a question about how to do some code and they say, "Well, go to tools->options-> in VS...".

                            I'm exaggerating a little but it sure seems that way.

                            Comment

                            • Banfa
                              Recognized Expert Expert
                              • Feb 2006
                              • 9067

                              #29
                              Originally posted by bartonc
                              Does "if I chose" mean that this is not really a practical solution, but merely possibility?
                              No it's really not that hard it is just easier to use an IDE particularly for resource editing,

                              First write a Window Handler Procedure

                              Then in WinMain

                              Register a Window Class (this is a construct of Windows nothing to do with C++) with RegisterClass
                              Create a Window of that Class with CreateWindow
                              Enter a message loop.
                              Code:
                              BOOL bRet;
                              
                              while( (bRet = GetMessage( &msg, NULL, 0, 0 )) != 0 ) 
                              {
                                 if (bRet == -1 )
                                 {
                                    // handle the error and possibly exit
                                 }
                                 else
                                 {
                                    TranslateMessage( &msg );
                                    DispatchMessage( &msg );
                                 }
                              }
                              And that is all there is to it, of course if you want menus and other resources you will need a resource file too, those can be written by hand but even before Visual Studio existed there where GUI programs to do the resource editing.

                              Comment

                              Working...