• 0

[java] Critical Thinking Question..


Question

this is a question i was asked but i dont know what to say.. can anyone help me out here :)

According to James Gosling, author of Java language, in c/c++ things break. This is not the case in java. Discuss what is Gosling talking about.

:huh:

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
According to James Gosling, author of Java language, in c/c++ things break. This is not the case in java. Discuss what is Gosling talking about.

lol...that sounds like a homework question. but honestly, i wouldn't know how to answer that either. maybe look up james gosling and more about what he has to say...

Link to comment
Share on other sites

  • 0

Could mean a few things. C/C++ is generally used for platform specific, system development, so is much more closely tied to hardware, and poorly written C can cause systems to fail. Not the case in Java, or at least I've never seen a Java app crash a computer; a JVM maybe, but not an OS.

Also, write a library in C/C++, compile a client against it, then change something in the library, like add a new function, compile it, then try to use your client with the new lib. Even if you have a C++ class and add private data to it, it'll break the client without a full recompile/relink. I haven't experienced that type of behavior in Java, though it may very well be possible for that to occur. I do know that class changes can "break" serialization, but that is expected and should be accounted for.

In terms of just programming practices, it is entirely possible to write crappy code in Java, just like in C/C++. I do think that good C/C++ programmers can write better code that most good Java programmers. I believe that was the case in a survey involving C, C++, and Java programmers and a specific programming task. It was shown that the best C programmers wrote the best(i.e. efficient, stable, etc.) code over all the other programmers, with the C++ following close behind. The best of the Java programmers, about 1% of all the participating Java programmers, were fairly close to the C++ programmers, but the rest were far behind. If I can find the article, i'll post a link. I think it was conducted by the ACM. ( I got that second hand from a software engineer at Motorola, so it may be a bit biased )

Personally, I am somewhat ambivalent about Java. I think it serves a purpose in distributed computing, but it doesn't really serve a purpose in anything that requires even the slightest bit of performance or memory constraints.

Link to comment
Share on other sites

  • 0
According to James Gosling, author of Java language, in c/c++ things break. This is not the case in java. Discuss what is Gosling talking about.

lol...that sounds like a homework question. but honestly, i wouldn't know how to answer that either. maybe look up james gosling and more about what he has to say...

its not exactly hw.. we are gonna have to discuss this topic in groups kinda.. so i dont wanna sound like an idiot :wacko:

Link to comment
Share on other sites

  • 0

Another viewpoint is that Java is a safe language. This means that there is no direct memory management and hence the area which leads to the most errors (according to Gosling and now Microsoft also) is somewhat removed. This is because Java is reference based and not pointer based... programmers have been known to be bad at memory management.

Peeeeeeeeeeez

Link to comment
Share on other sites

  • 0
Could mean a few things. C/C++ is generally used for platform specific, system development, so is much more closely tied to hardware, and poorly written C can cause systems to fail. Not the case in Java, or at least I've never seen a Java app crash a computer; a JVM maybe, but not an OS.

Also, write a library in C/C++, compile a client against it, then change something in the library, like add a new function, compile it, then try to use your client with the new lib. Even if you have a C++ class and add private data to it, it'll break the client without a full recompile/relink. I haven't experienced that type of behavior in Java, though it may very well be possible for that to occur. I do know that class changes can "break" serialization, but that is expected and should be accounted for.

In terms of just programming practices, it is entirely possible to write crappy code in Java, just like in C/C++. I do think that good C/C++ programmers can write better code that most good Java programmers. I believe that was the case in a survey involving C, C++, and Java programmers and a specific programming task. It was shown that the best C programmers wrote the best(i.e. efficient, stable, etc.) code over all the other programmers, with the C++ following close behind. The best of the Java programmers, about 1% of all the participating Java programmers, were fairly close to the C++ programmers, but the rest were far behind. If I can find the article, i'll post a link. I think it was conducted by the ACM. ( I got that second hand from a software engineer at Motorola, so it may be a bit biased )

Personally, I am somewhat ambivalent about Java. I think it serves a purpose in distributed computing, but it doesn't really serve a purpose in anything that requires even the slightest bit of performance or memory constraints.

:blush: that link would be awesome :) i.e. if u can find it

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.