Page 1 of 3 123 LastLast
Results 1 to 16 of 39

Thread: For OOPL developers

  1. #1
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    For OOPL developers

    I was wondering what your views were on C++ and Java in developing apps. How would you rate and compare the two? What is good about one and bad about the other? Can you think of an advantage of one over the other in developing certain applications? Basically how would you review and compare the two?
    To err is human. To really foul things up ... you need a computer.

  2. #2
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Simple version:

    C++: Painful
    Java: Not painful

    Slightly expanded version:

    Java has built in memory management. C++ doesn't. Java is totally portable. C++ isn't.
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  3. #3
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    Is there a rather more expanded version than your slightly expaned version?
    To err is human. To really foul things up ... you need a computer.

  4. #4
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Your occupation is set to "Ex Structured Systems Analyst. 3 years experience UML, Visual Paradigm, ERWin, BPWin, secondary experience C, C++, Java, VB and customized MS & Open Office solutions. Mail yaman_an@hotmail.com for employment interest " and you want to know more?!?!?!
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  5. #5
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    I'm interested in what people think of the two from a development perspective. You stated what you thought but it, of course, was a little blithe, I was wondering if you had anything else to say about it, don't know what, anything really. Specific problems you've faced when developing perhaps, when you wished you had the constructor control of Java. I think any further comments you had would lean to Java however . I too am a little stuck for comments I would make favoring C++ over Java. What further reasons do you have for favoring Java perhaps?

    Edit

    Oh and that description is out of date, I have a job now, and I no longer have that email
    To err is human. To really foul things up ... you need a computer.

  6. #6
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Java is simply a higher level language with a richer set of high quality API's. I cant see any reason (other than speed) for writing in C++ in this day in age.
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  7. #7
    TiG
    TiG is offline
    Walk a mile in other peoples shoes...
    Join Date
    Jul 2003
    Location
    Questioning it all
    Posts
    6,213
    Thanks
    43
    Thanked
    47 times in 42 posts
    I'd say you are probably making the wrong judgements, Compare C# to Java is more fair now, C++ is certainly an older and more widely used technology than Java, But there is without doubt definite specialisations in C++.

    I personally find C++ horrible to code in, but then i did do java at Uni for 3+ years. Graphics used to be a pain in the backside in Java, but even this has been smoothed out in recent years.

    but then i think .net is a superb if slightly obese language and in a year or so will really have matured well and be very popular.

    TiG
    -- Hexus Meets Rock! --

  8. #8
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    As you say, Java has built-in memory management. Wouldn't you also consider this a downside for Java?
    To err is human. To really foul things up ... you need a computer.

  9. #9
    ?!
    Join Date
    Sep 2004
    Posts
    1,045
    Thanks
    2
    Thanked
    6 times in 5 posts
    Quote Originally Posted by yamangman
    As you say, Java has built-in memory management. Wouldn't you also consider this a downside for Java?
    Given that the modern PC is in the GHZ+ , and that most Java applications that ive come across are not real-time interactive 3D apps (although now possible since JDK 1.5 w/OpenGL), the tradeoff in letting the VM sort memory and other unfriendly aspects really does favour developers and end users.

    The safety of the sandbox mechanism has gone missed in this whole thread. This is an area where Java is strong, with only a few sandbox exploits as of lately.

    Old versions and even some current C++ compilers dont check for stack/buffer overflow potential. Infact, the /gs switch has only been introduced in the last year for C++ compiling for MS compilers.

  10. #10
    Junior Senior Member Aaron's Avatar
    Join Date
    Jul 2003
    Location
    London, England
    Posts
    1,516
    Thanks
    0
    Thanked
    1 time in 1 post
    Well, I write operating systems for a living so I don't have much choice between the two.

    I think that Java is great if you need to develop something quickly and cheaply. Add cross-platform portability and it becomes very useful for enterprises and small companies/individuals.

    However, it does lack some of the control and customisability of C++. And because it doesn't have things like automatic garbage collection, it actually makes the developer think about what they're doing and its consequences, which isn't a bad thing in my opinion. C++ is still the choice for most "serious" programmers, IMO.

    .NET seems more about politics and marketting than technology to me though.

    Given that the modern PC is in the GHZ+ , and that most Java applications that ive come across are not real-time interactive 3D apps (although now possible since JDK 1.5 w/OpenGL), the tradeoff in letting the VM sort memory and other unfriendly aspects really does favour developers and end users.
    ...assuming the app is being developed for a PC. There's still a lot of mobile devices (PDAs, phones, etc) with much more limited memory.

  11. #11
    ?!
    Join Date
    Sep 2004
    Posts
    1,045
    Thanks
    2
    Thanked
    6 times in 5 posts
    Quote Originally Posted by Aaron
    Well, I write operating systems for a living so I don't have much choice between the two.

    I think that Java is great if you need to develop something quickly and cheaply. Add cross-platform portability and it becomes very useful for enterprises and small companies/individuals.

    However, it does lack some of the control and customisability of C++. And because it doesn't have things like automatic garbage collection, it actually makes the developer think about what they're doing and its consequences, which isn't a bad thing in my opinion. C++ is still the choice for most "serious" programmers, IMO.

    .NET seems more about politics and marketting than technology to me though.



    ...assuming the app is being developed for a PC. There's still a lot of mobile devices (PDAs, phones, etc) with much more limited memory.

    Yup and J2ME + environment specifcation will be decided beforehand.

    I think its a little silly to say that developers dont "think" about what they're doing thou I'd say some just dont care enough to pay detailed attention, rather than think.

    But without a doubt, where performance and flexibility is concerned, C++ still wins here, although Sun are attempting to open up the Java library source codes to academics only... wonderful :S

  12. #12
    Theoretical Element Spud1's Avatar
    Join Date
    Jul 2003
    Location
    North West
    Posts
    7,508
    Thanks
    336
    Thanked
    320 times in 255 posts
    • Spud1's system
      • Motherboard:
      • Gigabyte Aorus Master
      • CPU:
      • 9900k
      • Memory:
      • 16GB GSkill Trident Z
      • Storage:
      • Lots.
      • Graphics card(s):
      • RTX3090
      • PSU:
      • 750w
      • Case:
      • BeQuiet Dark Base Pro rev.2
      • Operating System:
      • Windows 10
      • Monitor(s):
      • Asus PG35VQ
      • Internet:
      • 910/100mb Fibre
    ... I really can't believe that some ppl here are choosing java as a perference over c++...

    Ok so it has its uses, mainly in the web domain where something needs to be used on multiple platforms without needing serparate compiled versions, or for J2ME apps its perfectly suited - but could you imagine writing a full 3D game in java? or a fast, usable IDE for example?

    Its just not suited to large scale PC apps, and this is mainly due to the fact that it is so slow...A prime example is borlands 'jbuilder X', ironicly a java IDE built on JAVA. Its painful to use, so slow when you try to do anything more advanced than write a few lines of code. Try any of its graphics features and you might aswell go make a brew while it tries to load.

    Compare this to visual studio.net 2003 , completely different, much faster. Or maye thats not a fair comparision, so compare it to borlands own C++ builder, again the difference in speed and usability is immense.

    The main problem isnt shoddy coding here, its more to do with the fact that its an interpreted language, whereas C++ is pre-compiled so is naturally going to be faster to execute.

    Then there comes my next major gripe with java, the lack of pointers....Ok so they are there, but not in anywhere near the same way as C/C++ etc; this limits its usefulness again.

    Its plus points as far as i can see are just that its quick to program in for small apps, and i can't argue with that, but it would be useless for anything big

    just my opinion there, take it how you will

  13. #13
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Quote Originally Posted by Aaron
    ++ is still the choice for most "serious" programmers, IMO.
    Actually I find this statement both snobbish, elitist and utterly wrong.

    Any programmer choosing their programming language based on nothing other than whether it is "serious" or not is being desperately unprofessional. Choose the right tool for the right job. Simple as that.
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  14. #14
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Quote Originally Posted by javalord
    Yup and J2ME + environment specifcation will be decided beforehand.

    I think its a little silly to say that developers dont "think" about what they're doing thou I'd say some just dont care enough to pay detailed attention, rather than think.

    But without a doubt, where performance and flexibility is concerned, C++ still wins here, although Sun are attempting to open up the Java library source codes to academics only... wonderful :S
    This is NOT TRUE. Java is often FASTER than C++ in tight looping (i.e. a server environment).

    http://www.idiom.com/~zilla/Computer...benchmark.html

    Google "java C++ performance". The trick is twofold:
    1. The JVM can make processor based optimisations to the java bytecode before execution
    2. The JVM can perform run-time optimisation.

    C/C++ gives you neither of these things.
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  15. #15
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    But with C++ you can port or create your own memory managers, with Java's garbage collection you do not have the option. You have to use the automatic process. Of course the main reason for this is security due to it's interpreted nature, but you have no control over when any garbage collection takes place. I think that's the main gripe for real-time apps.
    To err is human. To really foul things up ... you need a computer.

  16. #16
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Quote Originally Posted by yamangman
    But with C++ you can port or create your own memory managers, with Java's garbage collection you do not have the option. You have to use the automatic process. Of course the main reason for this is security due to it's interpreted nature, but you have no control over when any garbage collection takes place. I think that's the main gripe for real-time apps.
    That's fine. Dont use it for real time apps!
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Developers browser...
    By Agent in forum Software
    Replies: 10
    Last Post: 09-08-2004, 06:39 PM
  2. Warning all developers!
    By DaBeeeenster in forum General Discussion
    Replies: 5
    Last Post: 06-08-2003, 12:25 PM

Posting Permissions

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