Results 1 to 18 of 18

Thread: C++ or java?

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default C++ or java?

    Recently tried picking up java but it is so annoying to code in and i Get tons if errors... Also c++ seems more useful in the long run in terms of uses/game development/speed....

    Any way I don't want to waste time on java because I always end up getting poised off at it

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Recently tried picking up java but it is so annoying to code in and i Get tons if errors... Also c++ seems more useful in the long run in terms of uses/game development/speed....

    Any way I don't want to waste time on java because I always end up getting poised off at it

    Well, I don't want to burst any bubbles here or change your mind.. But, here's my opinion and my view:

    IF, for whatever reason you think any language is hard, you need a bit more confidence, time, and practice. Practice makes perfect, but that can never be said for languages like C++ or ASM or any language. You can be good though.

    IF you think Java is hard, well you probably will dislike C++ as it is both procedural and object oriented whereas java is just object oriented..

    IF, for some reason, you hate Java errors and stack traces.. You haven't met C++ Templates yet.. The longest error I've gotten was 13 lines long and made no sense, pointed to one line, and online forums was of no help :l

    I think my profile picture explains pretty much sums up what every C++ programmer experiences when beginning.. The same can be said for Java, but it is no where near as hard and at least comes with quite a large amount of already made functions/packages/libraries.

    If you like DIY stuff, C++ is definitely the language for you. If you like stuff where you just need a little push, want to develop quickly and don't care much for speed, Java/C# is for you.. I must say though, Java is pretty fast for some things though..


    Why not learn both? They're different experiences.. Anyway, if I seriously have to choose, C++ all the way. LOL. If you can program in C, C++, or ASM, you can adapt to any other language with ease. Transition is fairly easy from C-style to any other but I'm not so sure about the other way around..
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    Well, I don't want to burst any bubbles here or change your mind.. But, here's my opinion and my view:

    IF, for whatever reason you think any language is hard, you need a bit more confidence, time, and practice. Practice makes perfect, but that can never be said for languages like C++ or ASM or any language. You can be good though.

    IF you think Java is hard, well you probably will dislike C++ as it is both procedural and object oriented whereas java is just object oriented..

    IF, for some reason, you hate Java errors and stack traces.. You haven't met C++ Templates yet.. The longest error I've gotten was 13 lines long and made no sense, pointed to one line, and online forums was of no help :l

    I think my profile picture explains pretty much sums up what every C++ programmer experiences when beginning.. The same can be said for Java, but it is no where near as hard and at least comes with quite a large amount of already made functions/packages/libraries.

    If you like DIY stuff, C++ is definitely the language for you. If you like stuff where you just need a little push, want to develop quickly and don't care much for speed, Java/C# is for you.. I must say though, Java is pretty fast for some things though..


    Why not learn both? They're different experiences.. Anyway, if I seriously have to choose, C++ all the way. LOL. If you can program in C, C++, or ASM, you can adapt to any other language with ease. Transition is fairly easy from C-style to any other but I'm not so sure about the other way around..
    Java looks more easy to learn c++ looks to me just more easy to pick up the basics but harder to learn. Example: looking at a c++ tut already have a basic idea how to input a value "cin >> var;" and java... No idea...

  4. #4
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Java looks more easy to learn c++ looks to me just more easy to pick up the basics but harder to learn. Example: looking at a c++ tut already have a basic idea how to input a value "cin >> var;" and java... No idea...

    Java:
    System.Console Cin = new System.Console();
    String Input = Cin.ReadLine();

    Hint: Judge them both by what you need.. Not by what they look like.

    For me, C++ was way way way easier than learning Java.. My transition to java was uncomfortable as its more restricted.. Benland helped me a bit with that. Same with editing smart.

    For my buddies, they think I'm stupid when I say C++ is easier as they find it ridiculously tedious and hard.

    It's a do it yourself language with no restrictions. By that, it means that when you want to do something, you write all your own code whereas Java/C# have built in libraries and functions ready for use.

    I don't consider these advantages as I love having control over everything:

    Java/C# advantages:

    Garbage cleanup
    No pointers
    No ?ber long template errors
    Not much to worry about for Cross platform stuffs.


    C++ advantages:

    Delete objects and stuff when you want them cleaned. No need for garbage cleanup if you don't produce garbage in the first place.
    Pointers for direct memory access and speed
    Templates are better than C#\Java generics.
    Experience with all platforms and low level stuff.


    IMO, there are more restrictions and disadvantages in Java whereas when I use C++ I feel free and have none.

    That's debatable though. J-programmers will argue differently.

    Anyway, choose a language for what you need, not how it looks. Syntax can be part of the choice too but look at the abilities first.
    Last edited by Brandon; 01-15-2013 at 03:22 AM.
    I am Ggzz..
    Hackintosher

  5. #5
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Java looks more easy to learn c++ looks to me just more easy to pick up the basics but harder to learn. Example: looking at a c++ tut already have a basic idea how to input a value "cin >> var;" and java... No idea...
    but but but... i already gave u a link that described how to "cin" something into java in like 3 lines (on ur other thread).

    java is way easier than c++ in my opinion. what i did was that i learned c++ first. and after a few years of that, i learned java w/o any issues. it was a breeze. so i would recommend doing c++ first. just start off with procedural programming and work up to oop.

  6. #6
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by x[Warrior]x3500 View Post
    but but but... i already gave u a link that described how to "cin" something into java in like 3 lines (on ur other thread).

    java is way easier than c++ in my opinion. what i did was that i learned c++ first. and after a few years of that, i learned java w/o any issues. it was a breeze. so i would recommend doing c++ first. just start off with procedural programming and work up to oop.
    Stil don't know how to make it edit a variable and I can never run older java examples off the web because I have a different java version therefor making the language harder to learn when I don't have a working example. Also the documents from docs.oracle ( java website ) are veerryyy painful to read... It's like reading somebody's code when they don't use code tags

  7. #7
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    http://www.youtube.com/watch?v=KXuQQ...2CE09D83EE3E28

    this is a basic grade average tutorial (using scanner - the thing i suggested on ur other thread)

    also, if you want to learn java, watch all his beginner and intermediate tuts. they will give u a decent foundation.

  8. #8
    Join Date
    Jan 2012
    Posts
    159
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Recently tried picking up java but it is so annoying to code in and i Get tons if errors... Also c++ seems more useful in the long run in terms of uses/game development/speed....
    Wait, I thought people used C# now. 0_o

  9. #9
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    For Programming? Hardly, C# is for form/program design.

  10. #10
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    C++ is universal, as is Java. C# is a good Microsoft language to use.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  11. #11
    Join Date
    Jan 2012
    Posts
    1,104
    Mentioned
    18 Post(s)
    Quoted
    211 Post(s)

    Default

    I learnt both of the languages for half years at uni.

    I dont like C++, it is a lot harder (pointers/referencies). I have to take care of evertything, like freeing up all the stuff (java has garbage collector). And as Brandod said its harder to do debug.

    Java is so much simplier to me, there is everything you need in the includes, while C++ needs external stuff.

    If you want to make a heavy resource program, like a game, then C++, cause java is slow (virtual machine).

    But for anything else java is my suggestion.

  12. #12
    Join Date
    Dec 2012
    Posts
    115
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Shatterhand View Post
    I learnt both of the languages for half years at uni.

    I dont like C++, it is a lot harder (pointers/referencies). I have to take care of evertything, like freeing up all the stuff (java has garbage collector). And as Brandod said its harder to do debug.

    Java is so much simplier to me, there is everything you need in the includes, while C++ needs external stuff.

    If you want to make a heavy resource program, like a game, then C++, cause java is slow (virtual machine).

    But for anything else java is my suggestion.
    You don't have to use pointers if you don't like them. They aren't mandatory lol. I kind of like having control of freeing up memory after dynamically allocating memory to pointers, then i know exactly whats happening. To me, its really easy to debug! sounds like you didn't try very hard to learn it


    Anyway,


    This is exactly with I prefer C++ to Java. C++ is very useful if you want to persue game development or programming in general. Like you, Java only gives me errors and doesn't seem to make a lot of sense to me. If you enjoy programming in a very Object oriented mindset then you will love C++ and for those reasons, I say go for C++
    Last edited by mcbain; 01-15-2013 at 10:17 PM.

  13. #13
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by mcbain View Post
    You don't have to use pointers if you don't like them. They aren't mandatory lol. I kind of like having control of freeing up memory after dynamically allocating memory to pointers, then i know exactly whats happening. To me, its really easy to debug! sounds like you didn't try very hard to learn it


    Anyway,


    This is exactly with I prefer C++ to Java. C++ is very useful if you want to persue game development or programming in general. Like you, Java only gives me errors and doesn't seem to make a lot of sense to me. If you enjoy programming in a very Object oriented mindset then you will love C++ and for those reasons, I say go for C++

    What? Pointers in C++ is definitely unavoidable.. There is no way any C++ programmer would get far without using pointers or dynamic memory allocations. RAII is good but it's not meant to replace everything that needs to require resources. The furthest anyone gets without pointers is considered helloworld afaik..


    Vectors, Lists, RAII classes are good but pointers are irreplaceable and unavoidable. Smart Pointers is what C++x11 recommends but there are times when raw pointers are still necessary. Especially for Legacy code. They're pretty much mandatory to get anything useful done..
    I am Ggzz..
    Hackintosher

  14. #14
    Join Date
    Dec 2012
    Posts
    115
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    What? Pointers in C++ is definitely unavoidable.. There is no way any C++ programmer would get far without using pointers or dynamic memory allocations. RAII is good but it's not meant to replace everything that needs to require resources. The furthest anyone gets without pointers is considered helloworld afaik..


    Vectors, Lists, RAII classes are good but pointers are irreplaceable and unavoidable. Smart Pointers is what C++x11 recommends but there are times when raw pointers are still necessary. Especially for Legacy code. They're pretty much mandatory to get anything useful done..
    Definitely agree on the fact that they are an extremely useful tool to getting many things done and dynamically allocated memory is a must in further advanced programming. I used the wrong word when i said "mandatory", there are times when you have to and a lot of times when its better to stay away from them. All depends on what you are doing with your program and what you want done

  15. #15
    Join Date
    May 2012
    Location
    Moscow, Russia
    Posts
    661
    Mentioned
    35 Post(s)
    Quoted
    102 Post(s)

    Default

    I do not like C++. I find it a monster. But I like the classic C for low level tasks. I will use C++ only if task requires it. For graphics applications, I prefer Lazarus/Delphi. Java, Java is good for servers with high load. But for other tasks, in my opinion ... he's too clumsy and slow. I mean Java Gui.
    Per aspera ad Astra!
    ----------------------------------------
    Slow and steady wins the race.

  16. #16
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by CynicRus View Post
    I do not like C++. I find it a monster. But I like the classic C for low level tasks. I will use C++ only if task requires it. For graphics applications, I prefer Lazarus/Delphi. Java, Java is good for servers with high load. But for other tasks, in my opinion ... he's too clumsy and slow. I mean Java Gui.
    Adding buttons with java is TERRIBLE.

    Get errors to easily, and theres no useful guides on the internet. kind of turns me away from it

  17. #17
    Join Date
    May 2012
    Location
    Moscow, Russia
    Posts
    661
    Mentioned
    35 Post(s)
    Quoted
    102 Post(s)

    Default

    Haha, then choose between C# or Delphi. It is very easy to create any GUI.
    Per aspera ad Astra!
    ----------------------------------------
    Slow and steady wins the race.

  18. #18
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by CynicRus View Post
    Haha, then choose between C# or Delphi. It is very easy to create any GUI.
    There are also GUI Builders for Java, but OP shouldn't expect to get everything working at first attempt.

    Script source code available here: Github

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •