Announcement

Collapse
No announcement yet.

About to start a Comp Sci MSc - should I choose C++ or Java?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by Asher View Post
    I wouldn't get hung up on the C++/Java split in the courses. It really doesn't matter what you take in school.

    Learning Java and/or C++ makes it fairly easy to learn the other. C++ is more difficult due to the low-level nature, though.
    If you've worked with C, and you've worked with Java (as I have), is there anything new in C++?
    If there is no sound in space, how come you can hear the lasers?
    ){ :|:& };:

    Comment


    • #32
      Multiple inheritance. The friend and delete keywords. And templates, back when we were your age (but not any more, you would know them as generics).

      My old boss came from a Java background and didn't know you had to delete things in C++. After we tracked down the ensuing memory leak, he was embarrassed enough to imply to his bosses that it was my fault. He was pretty funny (what do I care, I was an intern).

      SP
      I got the Jete from C.C. Sabathia. : Jon Miller

      Comment


      • #33
        Does multiple inheritance work similarly to the way it does in Python?

        EDIT: Also, aren't there garbage collection libraries available? Or are you just a horrible person for using them?
        Last edited by Hauldren Collider; September 4, 2010, 19:27.
        If there is no sound in space, how come you can hear the lasers?
        ){ :|:& };:

        Comment


        • #34
          I'm not even sure how you would go about adding garbage collection to C++ without some really obnoxious sugar liberally sprinkled anywhere you allocated an object or assigned a reference/pointer...

          Comment


          • #35
            Originally posted by Hauldren Collider View Post
            Does multiple inheritance work similarly to the way it does in Python?
            Multiple inheritance is more sophisticated in Python's new-style classes because they support the super() function, which doesn't have an analogue in C++. I think the old-style classes use a similar inheritance mechanism to C++'s.

            GC libraries for C++ exist, but I've never used one. I can't see any reason to use one unless your team is made up of a bunch of dumb Java programmers.

            SP
            I got the Jete from C.C. Sabathia. : Jon Miller

            Comment


            • #36
              c++ also has boost..

              JM
              Jon Miller-
              I AM.CANADIAN
              GENERATION 35: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

              Comment


              • #37
                Originally posted by Fve Crathva View Post
                GC libraries for C++ exist, but I've never used one. I can't see any reason to use one unless your team is made up of a bunch of dumb Java programmers.

                SP


                Actually, I think that it should be obligatory to be able to make efficient programs on a Z80 processor befor you can call yourself an experienced programmer
                With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

                Steven Weinberg

                Comment


                • #38
                  Originally posted by Fve Crathva View Post
                  GC libraries for C++ exist, but I've never used one. I can't see any reason to use one unless your team is made up of a bunch of dumb Java programmers.

                  SP
                  I can't argue with that.
                  If there is no sound in space, how come you can hear the lasers?
                  ){ :|:& };:

                  Comment


                  • #39
                    Originally posted by Kuciwalker View Post
                    I'm not even sure how you would go about adding garbage collection to C++ without some really obnoxious sugar liberally sprinkled anywhere you allocated an object or assigned a reference/pointer...
                    It's not true garbage collection, but any C++ program written by competent people today uses the Boost libraries extensively. You can do reference counting (we used shared_ptr a TON in our codebase).
                    "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                    Ben Kenobi: "That means I'm doing something right. "

                    Comment


                    • #40
                      OK, so exactly what I said then.

                      Comment


                      • #41
                        I don't find it too obnoxious. You get used to it. typedef if you want.
                        "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                        Ben Kenobi: "That means I'm doing something right. "

                        Comment


                        • #42
                          Eh, OK. I'm not one to knock languages for design decisions that were good at the time, and only became awkward a decade later when the state of the art had advanced. Still, retrofitting GC onto C++ seems like it's worth breaking compatibility and just altering the language itself.

                          Comment


                          • #43
                            Originally posted by duke o' york View Post
                            Now, despite the fact that I know nothing about programming beyond:
                            10 Print 'HC is a knob'
                            20 GoTo 10

                            then I was under the impression that Java is relied on by loads of mobile phone programs, and can only see this market expanding, so would have thought that was the best area to move into right now. Good luck CH, and don't forget to blow your student grant on booze within the first week.
                            I kind of agree. The same applies to me. I do ABAP programming (if you know SAP, this will make sense) but the next most useful one there is Java which is also frequently used for various net-based or mobile applications that you can also use in conjunction with SAP, so this would be the way I would personally go, but I am in a bit of a different area of IT to yourself, so it doesn't necessarily mean anything.
                            Speaking of Erith:

                            "It's not twinned with anywhere, but it does have a suicide pact with Dagenham" - Linda Smith

                            Comment


                            • #44
                              Originally posted by Kuciwalker View Post
                              Eh, OK. I'm not one to knock languages for design decisions that were good at the time, and only became awkward a decade later when the state of the art had advanced. Still, retrofitting GC onto C++ seems like it's worth breaking compatibility and just altering the language itself.
                              No, because that fundamentally alters the language.

                              If you want GC C++, that already exists. C++/CLI.
                              "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                              Ben Kenobi: "That means I'm doing something right. "

                              Comment


                              • #45
                                What exactly is Boost? At VCT the C++ programmers (that is, most of the programming team) talked about Boost a lot, and I'm getting the feeling it's what makes C++ a usable language.

                                One of the guys said something about it getting added to the formal C++ standard.
                                If there is no sound in space, how come you can hear the lasers?
                                ){ :|:& };:

                                Comment

                                Working...
                                X