Java or C++?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Kanze

    #16
    Re: Java or C++?

    On 20 avr, 02:00, Matthias Buelow <m...@incubus.d ewrote:
    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.
    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.
    That's actually a good point. If the goal is learning, a
    language which gets you out of the OO/procedural mold will
    probably teach you a lot more than a language which is, when all
    is said and done, pretty similar to the one you already know.

    --
    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

    • noagbodjivictor@gmail.com

      #17
      Re: Java or C++?

      On Apr 19, 8:26 am, 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?
      Are you sure you've been programming Python for years now? I believe
      that Python is similar and better than Java, and the natural language
      that a person would switch to after python is C/C++ (because Python
      modules are extended by C).

      So, No, you've not been programming Python for years. And you should
      stop saying it.

      Comment

      • Krice

        #18
        Re: Java or C++?

        On 20 huhti, 06:29, Razii <whatever1...@h otmail.comwrote :
        You can malke the class final and make everything static.
        I guess that is not the same thing, just doesn't sound good.
        Does java even have pointers?

        Comment

        • s0suk3@gmail.com

          #19
          Re: Java or C++?

          On Apr 20, 11:10 am, "noagbodjivic.. .@gmail.com"
          <noagbodjivic.. .@gmail.comwrot e:
          On Apr 19, 8:26 am, 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?
          >
          Are you sure you've been programming Python for years now? I believe
          that Python is similar and better than Java, and the natural language
          that a person would switch to after python is C/C++ (because Python
          modules are extended by C).
          >
          So, No, you've not been programming Python for years. And you should
          stop saying it.
          Yes, I have.

          Comment

          • Crazy c

            #20
            Re: Java or C++?

            On Apr 19, 7:26 am, 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?
            To get a good handle on Java, C++ is the best foundation. Java is a
            very friendly C++. Yes, sometimes C++ is like oral surgery, but once
            you somewhat get it, Java is a cake walk, so to speak.

            Comment

            • Pete Becker

              #21
              Re: Java or C++?

              On 2008-04-20 12:28:55 -0400, Krice <paulkp@mbnet.f isaid:
              On 20 huhti, 06:29, Razii <whatever1...@h otmail.comwrote :
              >You can malke the class final and make everything static.
              >
              I guess that is not the same thing, just doesn't sound good.
              Does java even have pointers?
              No, but it has object of type NullPointerExce ption.

              --
              Pete
              Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The
              Standard C++ Library Extensions: a Tutorial and Reference
              (www.petebecker.com/tr1book)

              Comment

              • Razii

                #22
                Re: Java or C++?

                On Sun, 20 Apr 2008 13:23:58 -0700, "Chris Thomasson"
                <cristom@comcas t.netwrote:
                >No. However, you can add them if your want:
                >fairly simple.
                Would compiler be able to optimize this, like JIT compiler? i.e if
                the compiler is sure that there won't be array out of bound, the check
                is never done?


                Comment

                • Ian Collins

                  #23
                  Re: Java or C++?

                  Razii wrote:
                  On Sun, 20 Apr 2008 13:23:58 -0700, "Chris Thomasson"
                  <cristom@comcas t.netwrote:
                  >
                  >No. However, you can add them if your want:
                  >
                  >fairly simple.
                  >
                  Would compiler be able to optimize this, like JIT compiler? i.e if
                  the compiler is sure that there won't be array out of bound, the check
                  is never done?
                  Yes.

                  --
                  Ian Collins.

                  Comment

                  • Lambda

                    #24
                    Re: Java or C++?

                    On Apr 19, 10:32 pm, s0s...@gmail.co m wrote:
                    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.
                    I recommend learn C++ and Java all.
                    If you learn C++ first, you'll find Java is much easier to learn.
                    C++ is more fun, more educational, as you can handle details.

                    Java has more full library than C++, such as networking, GUI, web.
                    But C++'s container and algorithm libraries are more powerful than
                    Java's.

                    I'd like to learn Python next. You know why?
                    C++, Java and Python are Google's favorite languages. :)

                    Stephen Hsu

                    Comment

                    • Krice

                      #25
                      Re: Java or C++?

                      On 20 huhti, 23:14, Razii <whatever1...@h otmail.comwrote :
                      Does C++ even have array index out of bounds check?
                      For programmers that make simple mistakes?

                      Comment

                      • xtrigger303@gmail.com

                        #26
                        Re: Java or C++?

                        Hi to all,

                        I've to say that all these threads C++ vs the world are very
                        interesting.

                        I'am an amateur programmer, I do small MIDI and audio apps just for
                        fun,
                        mainly for my electronic music productions( always just for fun, no
                        talent at all, sigh... ;-)

                        All the statements made in recent threads make me think that all the
                        hours spent in
                        learning how to program in C and C++ were useless.

                        So out of frustration I would like to ask to Java, 0Caml or whatever
                        else supporters:
                        How many POPULAR COMMERCIAL APPS in "real-time" fields like audio,
                        video or video-games
                        are made in Java or whatever else. I ask about these kind of apps
                        because they're the ones
                        I'm mostly interested in and because I would think they're the ones
                        where speed is of great importance.

                        My understanding is that (correct me if I'm wrong ):

                        - Almost all today's audio technologies/apps (like Cubase, Logic, VST
                        and Core Audio stuff )
                        are written in C and C++. For an awesome audio app that is written
                        mainly in C++ check out
                        Propellerheads Reason.

                        - 90% of todays video-game engines are written in C or C++. I'm
                        totally sure about Unreal Engine.
                        Plus I've seen source code for Quake and others. Never seen any Java
                        code for POPULAR GAMES.

                        - My personal favourite Metal Gear Solid for PS2 had its engine
                        written in C. I'm sure about MGS2,
                        cannot be sure about the others, but...

                        So if EVERYTHING can be done more productively in Java or 0Caml ( or
                        whatever ) and the final result should
                        be even faster (??) than the C or C++ equivalent, WHY all pros in the
                        above mentioned genres are still using
                        obsolete languages?

                        Please PROs enlighten a lost soul... :-)

                        Regards to all,
                        Francesco

                        P.S.
                        All this said I've to say that some Razii's thread are very
                        interesting...

                        Comment

                        • Pascal J. Bourguignon

                          #27
                          Re: Java or C++?

                          xtrigger303@gma il.com writes:
                          Hi to all,
                          >
                          I've to say that all these threads C++ vs the world are very
                          interesting.
                          >
                          I'am an amateur programmer, I do small MIDI and audio apps just for
                          fun,
                          mainly for my electronic music productions( always just for fun, no
                          talent at all, sigh... ;-)
                          >
                          All the statements made in recent threads make me think that all the
                          hours spent in
                          learning how to program in C and C++ were useless.
                          Not entirely. But to have fun developping small MIDI and audio
                          application, indeed I wouldn't consider C or C++ indicated.
                          So out of frustration I would like to ask to Java, 0Caml or whatever
                          else supporters:
                          How many POPULAR COMMERCIAL APPS in "real-time" fields like audio,
                          video or video-games
                          are made in Java or whatever else. I ask about these kind of apps
                          because they're the ones
                          I'm mostly interested in and because I would think they're the ones
                          where speed is of great importance.
                          Remember that real-time is not the same as fast. Real-time means that
                          the time needed to do some computation is bounded, the bound is known,
                          and is less than the period in which it must be computed.

                          For MIDI applications, that means that you need to compute one byte
                          every 1/3125 second = 320 microsecond. There's time to execute more
                          than 320000 instructions on a modern processor to compute that byte.
                          And a note on command is three bytes, meaning that you have more than
                          one millisecond to compute the next note on or note off... An eternity
                          on current processors.

                          [...]
                          So if EVERYTHING can be done more productively in Java or 0Caml ( or
                          whatever ) and the final result should
                          be even faster (??) than the C or C++ equivalent, WHY all pros in the
                          above mentioned genres are still using
                          obsolete languages?
                          McDonald vs. La Tour d'Argent.

                          Also, most often, it's not programmers who get to choose the
                          programming language, but the managers. And what matters to the
                          manager is not that programming be efficient or fun, but that they be
                          able to hire easily (ie. cheaply) a lot of monkeys^W "programmer s".


                          Anyways, you're in the game for fun, not for money, so why should you
                          care what the so called "pro" do or don't? Choose a programming
                          language in which you don't spend time on trivial technicalities, and
                          with which you have fun programming your little applications.


                          --
                          __Pascal Bourguignon__

                          Comment

                          • xtrigger303@gmail.com

                            #28
                            Re: Java or C++?

                            On 21 Apr, 11:44, p...@informatim ago.com (Pascal J. Bourguignon)
                            wrote:
                            xtrigger...@gma il.com writes:
                            Hi to all,
                            >
                            I've to say that all these threads C++ vs the world are very
                            interesting.
                            >
                            I'am an amateur programmer, I do small MIDI and audio apps just for
                            fun,
                            mainly for my electronic music productions( always just for fun, no
                            talent at all, sigh... ;-)
                            >
                            All the statements made in recent threads make me think that all the
                            hours spent in
                            learning how to program in C and C++ were useless.
                            >
                            Not entirely. But to have fun developping small MIDI and audio
                            application, indeed I wouldn't consider C or C++ indicated.

                            VST plug-ins were built by sub-classing a C++ class (this a few years
                            ago,
                            don't know now)
                            Core Audio on the Mac is a C framework, with C++ wrappers
                            Programming on the Mac is mostly Obj-C (these days)

                            >
                            So out of frustration I would like to ask to Java, 0Caml or whatever
                            else supporters:
                            How many POPULAR COMMERCIAL APPS in "real-time" fields like audio,
                            video or video-games
                            are made in Java or whatever else. I ask about these kind of apps
                            because they're the ones
                            I'm mostly interested in and because I would think they're the ones
                            where speed is of great importance.
                            >
                            Remember that real-time is not the same as fast. Real-time means that
                            the time needed to do some computation is bounded, the bound is known,
                            and is less than the period in which it must be computed.
                            >

                            I don't know if an Audio Sequencer is a "real-time" app, for sure has
                            to complete
                            all its rendering functions in a given amount of time (forget about
                            buffering...)
                            The faster the code is, the better, isnt'it? For example, the amount
                            of audio plug-ins
                            that can work "simultaneously " is affected by the "speed" of the code.
                            If I were able to build Reverbs in Visual Basic I'm pretty sure that I
                            could run fewer of them at the same time, compared to ones written in
                            Java, C, C++
                            or whatever... Giving for granted that "equivalent " Basic interpreted
                            code
                            is slower... Is it?

                            For MIDI applications, that means that you need to compute one byte
                            every 1/3125 second = 320 microsecond. There's time to execute more
                            than 320000 instructions on a modern processor to compute that byte.
                            And a note on command is three bytes, meaning that you have more than
                            one millisecond to compute the next note on or note off... An eternity
                            on current processors.
                            >
                            [...]
                            So if EVERYTHING can be done more productively in Java or 0Caml ( or
                            whatever ) and the final result should
                            be even faster (??) than the C or C++ equivalent, WHY all pros in the
                            above mentioned genres are still using
                            obsolete languages?
                            >
                            McDonald vs. La Tour d'Argent.

                            I thought that Java was owned by Sun, while C and C++ are standardized
                            and
                            steered by independent committees...

                            >
                            Also, most often, it's not programmers who get to choose the
                            programming language, but the managers. And what matters to the
                            manager is not that programming be efficient or fun, but that they be
                            able to hire easily (ie. cheaply) a lot of monkeys^W "programmer s".
                            >

                            So great games and apps are made by forcing sub-intelligent people
                            to work in ways they do not like and that are proven obsolete?

                            Anyways, you're in the game for fun, not for money, so why should you
                            care what the so called "pro" do or don't? Choose a programming
                            language in which you don't spend time on trivial technicalities, and
                            with which you have fun programming your little applications.
                            >

                            I care about what the pros use because it's the only criteria I have
                            to
                            choose the tool of the trade. If all the apps, technologies,
                            literature, examples,etc...
                            in a certain genre are made in C or C++, why would I choose something
                            else?

                            Actually I have fun with C++, probably I would have fun also with Java
                            or 0Caml. The problem is the TIME i have at my disposal.

                            Anyway thanks for the answer. One more thing: if you were in charge of
                            bulilding
                            the next crushing video-game engine for the PS3, what language would
                            you choose?

                            Ciao,
                            Francesco


                            Comment

                            • xtrigger303@gmail.com

                              #29
                              Re: Java or C++?

                              On 21 Apr, 11:44, p...@informatim ago.com (Pascal J. Bourguignon)
                              wrote:
                              xtrigger...@gma il.com writes:
                              Hi to all,
                              >
                              I've to say that all these threads C++ vs the world are very
                              interesting.
                              >
                              I'am an amateur programmer, I do small MIDI and audio apps just for
                              fun,
                              mainly for my electronic music productions( always just for fun, no
                              talent at all, sigh... ;-)
                              >
                              All the statements made in recent threads make me think that all the
                              hours spent in
                              learning how to program in C and C++ were useless.
                              >
                              Not entirely. But to have fun developping small MIDI and audio
                              application, indeed I wouldn't consider C or C++ indicated.

                              VST plug-ins were built by sub-classing a C++ class (this a few years
                              ago,
                              don't know now)
                              Core Audio on the Mac is a C framework, with C++ wrappers
                              Programming on the Mac is mostly Obj-C (these days)

                              >
                              So out of frustration I would like to ask to Java, 0Caml or whatever
                              else supporters:
                              How many POPULAR COMMERCIAL APPS in "real-time" fields like audio,
                              video or video-games
                              are made in Java or whatever else. I ask about these kind of apps
                              because they're the ones
                              I'm mostly interested in and because I would think they're the ones
                              where speed is of great importance.
                              >
                              Remember that real-time is not the same as fast. Real-time means that
                              the time needed to do some computation is bounded, the bound is known,
                              and is less than the period in which it must be computed.
                              >

                              I don't know if an Audio Sequencer is a "real-time" app, for sure has
                              to complete
                              all its rendering functions in a given amount of time (forget about
                              buffering...)
                              The faster the code is, the better, isnt'it? For example, the amount
                              of audio plug-ins
                              that can work "simultaneously " is affected by the "speed" of the code.
                              If I were able to build Reverbs in Visual Basic I'm pretty sure that I
                              could run fewer of them at the same time, compared to ones written in
                              Java, C, C++
                              or whatever... Giving for granted that "equivalent " Basic interpreted
                              code
                              is slower... Is it?

                              For MIDI applications, that means that you need to compute one byte
                              every 1/3125 second = 320 microsecond. There's time to execute more
                              than 320000 instructions on a modern processor to compute that byte.
                              And a note on command is three bytes, meaning that you have more than
                              one millisecond to compute the next note on or note off... An eternity
                              on current processors.
                              >
                              [...]
                              So if EVERYTHING can be done more productively in Java or 0Caml ( or
                              whatever ) and the final result should
                              be even faster (??) than the C or C++ equivalent, WHY all pros in the
                              above mentioned genres are still using
                              obsolete languages?
                              >
                              McDonald vs. La Tour d'Argent.

                              I thought that Java was owned by Sun, while C and C++ are standardized
                              and
                              steered by independent committees...

                              >
                              Also, most often, it's not programmers who get to choose the
                              programming language, but the managers. And what matters to the
                              manager is not that programming be efficient or fun, but that they be
                              able to hire easily (ie. cheaply) a lot of monkeys^W "programmer s".
                              >

                              So great games and apps are made by forcing sub-intelligent people
                              to work in ways they do not like and that are proven obsolete?

                              Anyways, you're in the game for fun, not for money, so why should you
                              care what the so called "pro" do or don't? Choose a programming
                              language in which you don't spend time on trivial technicalities, and
                              with which you have fun programming your little applications.
                              >

                              I care about what the pros use because it's the only criteria I have
                              to
                              choose the tool of the trade. If all the apps, technologies,
                              literature, examples,etc...
                              in a certain genre are made in C or C++, why would I choose something
                              else?

                              Actually I have fun with C++, probably I would have fun also with Java
                              or 0Caml. The problem is the TIME i have at my disposal.

                              Anyway thanks for the answer. One more thing: if you were in charge of
                              bulilding
                              the next crushing video-game engine for the PS3, what language would
                              you choose?

                              Ciao,
                              Francesco


                              Comment

                              • Matthias Buelow

                                #30
                                Re: Java or C++?

                                Lambda wrote:
                                C++, Java and Python are Google's favorite languages. :)
                                Google? Hmm.. rings a bell... Aren't they those Usenet spammers?

                                Comment

                                Working...