Java or C++?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • s0suk3@gmail.com

    Java or C++?

    I've been programming Python for a couple of years now. Now I'm
    looking to move on to either C++ or Java, but I'm not sure which.

    Which one do you think will be a better transition for a Python
    programmer? Which one will educate me the best?
  • Alf P. Steinbach

    #2
    Re: Java or C++?

    * s0suk3@gmail.co m:
    I've been programming Python for a couple of years now. Now I'm
    looking to move on to either C++ or Java, but I'm not sure which.
    >
    Which one do you think will be a better transition for a Python
    programmer?
    Define "better".

    Going to Java will be easier.

    Which one will educate me the best?
    Define "best".


    Cheers, & hth.,

    - Alf

    Comment

    • s0suk3@gmail.com

      #3
      Re: Java or C++?

      On Apr 19, 8:59 am, "Alf P. Steinbach" <al...@start.no wrote:
      * s0s...@gmail.co m:
      >
      I've been programming Python for a couple of years now. Now I'm
      looking to move on to either C++ or Java, but I'm not sure which.
      >
      Which one do you think will be a better transition for a Python
      programmer?
      >
      Define "better".
      >
      Going to Java will be easier.
      >
      Which one will educate me the best?
      >
      Define "best".
      >
      Cheers, & hth.,
      >
      - Alf
      Well, I mean "better" and "best" in a very general sense, whichever
      sense you want to interpret it on. More useful, more fun, more
      educational, etc; or, as you already suggested, easier. Thanks.

      Comment

      • Krice

        #4
        Re: Java or C++?

        On 19 huhti, 17:32, s0s...@gmail.co m wrote:
        More useful, more fun, more
        educational, etc; or, as you already suggested, easier.
        The reason you are asking this here is that you have already
        decided for C++, which we all know is the best programming
        language.

        Comment

        • s0suk3@gmail.com

          #5
          Re: Java or C++?

          On Apr 19, 9:41 am, Krice <pau...@mbnet.f iwrote:
          On 19 huhti, 17:32, s0s...@gmail.co m wrote:
          >
          More useful, more fun, more
          educational, etc; or, as you already suggested, easier.
          >
          The reason you are asking this here is that you have already
          decided for C++, which we all know is the best programming
          language.
          Not quite. I also posted it on comp.lang.java. programmer. I really
          really can't decide!

          Comment

          • Lambda

            #6
            Re: Java or C++?

            On Apr 19, 8:26 pm, s0s...@gmail.co m wrote:
            I've been programming Python for a couple of years now. Now I'm
            looking to move on to either C++ or Java, but I'm not sure which.
            >
            Which one do you think will be a better transition for a Python
            programmer? Which one will educate me the best?
            It depends on what do you want to do with C++ or Java.

            I've spend several years with Java and becoming interested in C++.
            They are strong at different kind of applications.

            What kind of applications do you want to develop next?

            Comment

            • Krice

              #7
              Re: Java or C++?

              On 19 huhti, 17:44, s0s...@gmail.co m wrote:
              I also posted it on comp.lang.java. programmer.
              Illogical.
              I really really can't decide!
              There is no decision to be made. C++ is the true way.

              Comment

              • Michael.Boehnisch@gmail.com

                #8
                Re: Java or C++?

                On 19 Apr., 19:09, Krice <pau...@mbnet.f iwrote:
                There is no decision to be made. C++ is the true way.
                That's the spirit! :-)))

                best,

                Michael.

                Comment

                • Jim Langston

                  #9
                  Re: Java or C++?

                  s0suk3@gmail.co m wrote:
                  I've been programming Python for a couple of years now. Now I'm
                  looking to move on to either C++ or Java, but I'm not sure which.
                  >
                  Which one do you think will be a better transition for a Python
                  programmer? Which one will educate me the best?
                  Well, what is it you want to program?

                  You want to program 2D games? Java may be the way to go.
                  You want to program 3D games? C++ may be the way to go.
                  You want to write device drivers? C++

                  C++ is a more generall all around language that will allow you do do
                  anything, but with a cost. The cost of a much longer and steeper learning
                  curve. Java will get you writing applications faster, but for some things
                  you just won't be able to do it in Java or will have to find a library
                  written in some other language (such as C++) that interfaces into Java.


                  --
                  Jim Langston
                  tazmaster@rocke tmail.com


                  Comment

                  • Razii

                    #10
                    Re: Java or C++?

                    On Sat, 19 Apr 2008 05:26:05 -0700 (PDT), s0suk3@gmail.co m wrote:
                    >I've been programming Python for a couple of years now. Now I'm
                    >looking to move on to either C++ or Java, but I'm not sure which.
                    Good trolling post :)Obviously the answer would depend on the group
                    you posted this. You should have cross-posted the question, just for
                    some fun :) There is nothing that you can do in C++ that you can't do
                    in Java (except write low-lever drivers perhaps). Everything that you
                    can do in C++, you can do it much easier in Java with standard
                    libraries that support threading, networking, GUI and much more. Also,
                    the java app with GUI and networking will run only every OS that has a
                    JVM. In C++ you have to hunt for libraries, build them, and there is
                    no guarantee that you will get a portable product in the end.



                    Comment

                    • Krice

                      #11
                      Re: Java or C++?

                      On 20 huhti, 00:40, Razii <whatever1...@h otmail.comwrote :
                      Everything that you
                      can do in C++, you can do it much easier in Java
                      Can you break the class hierarchy and just hack in some old
                      school procedural code in Java?

                      Comment

                      • Sam

                        #12
                        Re: Java or C++?

                        s0suk3@gmail.co m writes:
                        On Apr 19, 8:59 am, "Alf P. Steinbach" <al...@start.no wrote:
                        >* s0s...@gmail.co m:
                        >>
                        I've been programming Python for a couple of years now. Now I'm
                        looking to move on to either C++ or Java, but I'm not sure which.
                        >>
                        Which one do you think will be a better transition for a Python
                        programmer?
                        >>
                        >Define "better".
                        >>
                        >Going to Java will be easier.
                        >>
                        Which one will educate me the best?
                        >>
                        >Define "best".
                        >>
                        >Cheers, & hth.,
                        >>
                        >- Alf
                        >
                        Well, I mean "better" and "best" in a very general sense, whichever
                        sense you want to interpret it on. More useful, more fun, more
                        educational, etc; or, as you already suggested, easier. Thanks.
                        If you already know Python, you will probably find Java easier to learn than
                        C++. Learning C++ will take more time, and will be more difficult. However,
                        once you know C++ you will have a much better understanding of low level
                        details that goes behind the scenes while your program runs, than Java,
                        which hides a lot of low-level details from you.

                        Then, once you already have wrapped your brain around C++, you will find
                        Java easier to learn next, and you will learn to be a better Java
                        programmer, because you will have a better understanding how the Java VM
                        works than someone who learned Java without known C++.

                        If try to learn C++ after learning Java, you may find it a bit of a rough
                        going. Your existing Java-oriented mindset you may make it more difficult to
                        learn important C++ concepts than if you were to approach C++ from a neutral
                        viewpoint, without already acquiring the Java way of looking at things.



                        -----BEGIN PGP SIGNATURE-----
                        Version: GnuPG v1.4.7 (GNU/Linux)

                        iD8DBQBICnLrx9p 3GYHlUOIRAu5DAJ 4gaED78YkUKuFd/Es2m59PHcFB+gCf cboD
                        SD2T1MIUDiCIqOh vLv/JPHE=
                        =eTry
                        -----END PGP SIGNATURE-----

                        Comment

                        • Matthias Buelow

                          #13
                          Re: Java or C++?

                          s0suk3@gmail.co m wrote:
                          I've been programming Python for a couple of years now. Now I'm
                          looking to move on to either C++ or Java, but I'm not sure which.
                          Both of course. Both are important contemporary languages that a
                          professional programmer ought to have at least some basic knowledge of.
                          Which one do you think will be a better transition for a Python
                          programmer? Which one will educate me the best?
                          Any Lisp dialect.

                          Comment

                          • Razii

                            #14
                            Re: Java or C++?

                            On Sat, 19 Apr 2008 15:05:46 -0700 (PDT), Krice <paulkp@mbnet.f i>
                            wrote:
                            >Can you break the class hierarchy and just hack in some old
                            >school procedural code in Java?
                            You can malke the class final and make everything static.


                            Comment

                            • James Kanze

                              #15
                              Re: Java or C++?

                              On 19 avr, 23:40, Razii <whatever1...@h otmail.comwrote :
                              On Sat, 19 Apr 2008 05:26:05 -0700 (PDT), s0s...@gmail.co m wrote:
                              I've been programming Python for a couple of years now. Now I'm
                              looking to move on to either C++ or Java, but I'm not sure which.
                              There is nothing that you can do in C++ that you can't do
                              in Java (except write low-lever drivers perhaps).
                              There's actually a lot: programming by contract, for example, or
                              intelligent management of locks. Or distribute a program for
                              which you can give reasonable guarantees of reliability on any
                              platform on which it runs (i.e. no dynamic linking).

                              I work mainly on large servers. I can't use Java for
                              reliability reasons; my code must work, every time.
                              Everything that you can do in C++, you can do it much easier
                              in Java with standard libraries that support threading,
                              Threading is actually considerably easier to do right in C++
                              than in Java.
                              networking, GUI and much more.
                              GUI is easier in Java. I've had no problem networking in C++,
                              and all of the large servers I'm familiar with (e.g. Apache,
                              etc.) are written in either C or C++---never in Java. When I
                              wrote the server for dynamic allocation of IP addresses
                              (networking), we used C++ for the server itself (for reliability
                              reasons, mainly---we guaranteed up time), and Java for all of
                              the interface code around it (mostly beans under WebSphere).
                              Also, the java app with GUI and networking will run only every
                              OS that has a JVM. In C++ you have to hunt for libraries,
                              build them, and there is no guarantee that you will get a
                              portable product in the end.
                              And if the code is only supposed to run on one machine, or a
                              small set of machines? With care, it's possible to write C++
                              code which ports easily to most Unix machines, and for large
                              scale servers, that's all you're interested in anyway.

                              --
                              James Kanze (GABI Software) email:james.kan ze@gmail.com
                              Conseils en informatique orientée objet/
                              Beratung in objektorientier ter Datenverarbeitu ng
                              9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                              Comment

                              Working...