C++ compared to Java

This is a discussion on C++ compared to Java within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Originally Posted by Jaqui the jvm issue isn't that it's needed, it's that there is more than one. sorry, eclipse ...

  1. #16
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by Jaqui
    the jvm issue isn't that it's needed, it's that there is more than one.
    sorry, eclipse framework to support multiple jvms is just more bloat in the language, not a smart choice.
    it's a cop-out, and the eclipse team should all be shot for stupidity.

    huh? Do you mean more than one JVM instance, or more than one vendor? If you mean more than one vendor than yes, that is a problem. No 2 JVMs are the same. If you mean more than one instance, than you don't understand how Java works

    Eclipse doesn't have a "framework to support multiple jvms" afaik, and it definately isn't part of the language. Don't drag eclipse into this, it's a great piece of software, many developers (Java and C++ alike) could learn a lot from it's design. Your ignorance just demonstrates your lack of understanding.

  2. #17
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    nope, eclipse is a java based tool to develop in java.
    it's primary benefit being support for multiple different jvms.
    the c++ tools in eclipse are all written in java.
    and every time I take distro supplied eclipse installers and install eclipse, it fails.
    [ gee, like microsoft office not installing on windows, not impressive for the application or company ]
    yup, every distro I have looked at I have tested the eclipse install, they have all failed to install a working version of it.
    [ yet another proof java is broken beyond usability, the "end all and be all" dev tool doesn't install.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  3. #18
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Hmm that is odd, I have never had any problems installing Eclipse, I had a couple problems with a couple plug-ins for it, but I found out that it was my fault and not the plug-in's fault. I typically don't use distro-provided software other than the base operating system and sometimes the drivers.

  4. #19
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Eclipse is a Java-based application infrastructure. The Eclipse Platform is a generic development environment.

    The Java Development Tools are the Java IDE, just like the C Development Tools are the C/C++ IDE.

    By distro-supplied Eclipse installers, do you mean Linux distros? So how is that Eclipse's fault? Eclipse's own installer works flawlessly. The program's main issue is that if it's installed to a cross-user directory, it takes an admin to install or upgrade plugins, which is the actual reason I don't use Gentoo's Eclipse ebuild (which otherwise worked flawlessly, I might add).

    And Eclipse's primary benefit is not supporting many JVMs. I still don't even know what you mean by that. Being installable in different versions? Others can do that. Compiling for multiple versions? Others can do that, too. Compiling for VMs by different vendors? Actually, JVM differences manifest themselves in different runtime characteristics; other than that, all programs run the same unless they use some vendor-specific functionality (such as com.sun.* or sun.* classes).

    Eclipse's primary benefit is its excellent design and thus the many great plugins available for it, including the extremely good Java editor, code refactorer, source completer, etc.

    And all of this has nothing to do with Java, so stop your pointless ranting.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #20
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    What exactly is a code refractorer. The most I've used it is to rename classes and it changes all references throughout the code to the class. Is there more to refractoring?

  6. #21
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    It can move methods through the hierarchy, classes to other packages, rename methods, variables, extract string literals into constants or resource files, all that stuff. And it can do it without introducing errors in your code, which is more than can be said about most manual refactoring.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #22
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,581
    > Is there more to refractoring?

    A lot more. Ultimately refactoring is about changing your code without affecting its behavior. It's not about changing your code to fix bugs or alter its behavior.

    At the simplest level it can be about changing one variable name to something more readable or understandable, and at the most complex level changing your whole hierarchy structure. You refactor all the time when writing code without a strict specification behind. However, the key point behind this abstract concept is that you only do it when you don't alter your application behavior.

    EDIT: I would probably add that not altering your application behavior, but improving its performance is not what refactoring is about either.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #23
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by Jaqui
    nope, eclipse is a java based tool to develop in java.
    it's primary benefit being support for multiple different jvms.
    the c++ tools in eclipse are all written in java.
    and every time I take distro supplied eclipse installers and install eclipse, it fails.
    [ gee, like microsoft office not installing on windows, not impressive for the application or company ]
    yup, every distro I have looked at I have tested the eclipse install, they have all failed to install a working version of it.
    [ yet another proof java is broken beyond usability, the "end all and be all" dev tool doesn't install.
    PEBKAC

  9. #24
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    >if it's installed to a cross-user directory, it takes an admin to install or upgrade plugins,

    Actually you can install plug-ins into user defined directorys, independant of the eclipse install location. You just select "Add local site" or something during the install wizard.


    +1 on eclipse's refactoring tools. Absolutely superb.

  10. #25
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by Perspective
    Actually you can install plug-ins into user defined directorys, independant of the eclipse install location. You just select "Add local site" or something during the install wizard.
    Yes, but my installation wanted to register them in some file that lies in the main installation directory. And as a normal user I don't have write access to that file.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  11. #26
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by CornedBee
    Yes, but my installation wanted to register them in some file that lies in the main installation directory. And as a normal user I don't have write access to that file.
    hmm, thats odd. I've never had that problem with the Fedora distro,

  12. #27
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Well, if I remember correctly, I got that ebuild from an experimental overlay, so that may have been it.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #28
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    Quote Originally Posted by ElastoManiac
    How faster is C++ compared to Java ? I tryed asking this at offical java forum but they deleted my thread...
    Why do you even care? Are you actually having trouble with Java being too slow?
    There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.

  14. #29
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    Why do you even care? Are you actually having trouble with Java being too slow?
    You never curious about things?

  15. #30
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    Disclaimer: I've programmed in both C++ and Java for quite a few years. In fact, I code J2EE applications for a living now.

    In my experience, for speed, C++ is definitely the winner here. Java is written in C++, so theoretically it can't be faster than C++. Plus, Java adds a lot of baggage like runtime array bounds-checking, instead of compile-time assert() checking, runtime generics instead of compile-time templates, etc.

    BUT HOLD ON! It can be faster than other less well-written C++ apps.

    Java is noticeably slow on Windows PCs during startup, and for Swing GUIs and applets.

    BUT HOLD ON! On Linux, Swing seems to perform much less poorly, and by using the non-standard SWT over Swing, desktop apps seem to improve remarkably in speed and native look-and-feel.
    Last edited by Dante Shamest; 12-24-2006 at 12:05 AM.

Page 2 of 3 FirstFirst 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mats, the java answers
    By Jaqui in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 04-22-2008, 03:12 AM
  2. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 03:06 PM
  3. The Java language is being expanded
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 06-11-2004, 10:07 PM
  4. Java woes
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 07-06-2003, 01:37 AM
  5. C or Java as a first language
    By CorJava in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 10-23-2002, 06:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21