Like Tree2Likes

What's up with Java programmers, anyway?

This is a discussion on What's up with Java programmers, anyway? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Java assumes the programmers don't know what they are doing, C/C++ assumes they do. That is the reason they left ...

  1. #16
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Java assumes the programmers don't know what they are doing, C/C++ assumes they do.

    That is the reason they left out things like pointers, unsigned types (not sure about this one), operator overloading, goto, casting to smaller types ("if (a = 5)"), stack allocations... etc.

  2. #17
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,310
    Quote Originally Posted by cyberfish
    casting to smaller types ("if (a = 5)")
    Perhaps more accurately, implicit conversion to types with a smaller range, since one can still type cast explicitly, or in your example, write "if ((a = 5) != 0)" (though either way it looks like a (potential) bug to me ).
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #18
    Complete Beginner
    Join Date
    Feb 2009
    Posts
    312
    Has C++ just made us better programmers - more inquisitive, pushing our minds to the limits, always searching for better insight, while Java programmers brains turn to jell-o due to non-exposure to the 'low-level details'?
    Java, being a RAD language, attracts sloppy people. Additionally, more "inquisitive" programmers will soon turn to more sophisticated languages.

    "Java is C++ without the guns, knives, and clubs."
    -- James Gosling

    Greets,
    Philip
    All things begin as source code.
    Source code begins with an empty file.
    -- Tao Te Chip

  4. #19
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Yes Java sucks, but unfortunatly I find myself using it an awful lot. Uni requires it, and most of the jobs want it (so it pays to have a private project written in Java).

    Things that I find (really) suck:
    * No const
    * while(0) is a compile error, whereas if(0) is not.
    * Casts galore, i.e. with integer/short/long literals. I've seen a few bugs because of this with overloading.
    * Generics suck

  5. #20
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,167
    Perhaps more accurately, implicit conversion to types with a smaller range, since one can still type cast explicitly, or in your example, write "if ((a = 5) != 0)" (though either way it looks like a (potential) bug to me ).
    haha yeah I meant implicit conversion.

    I think it should be up to the compilers to warn about this potential bug (as in C++), instead of not allowing it in the language.

    I'm so used to C/C++ that
    Code:
    if (a == 0)
    looks redundant to me .

  6. #21
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    I disagree.
    Everyone is fit to be a programmer, some just more than others. No one can't learn that typing
    Code:
    int main() { }
    makes a program execute, and that is programming...
    Currently research OpenGL

  7. #22
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    > makes a program execute, and that is programming...
    No, I beg to differ. You haven't "programmed the computer" to do anything.

  8. #23
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by abachler View Post
    Java is in my opinion an inferior language
    For what? That statement is meaningless without context.

    , I believe therefor that the people who choose to make it their primary language will tend to be of inferior intellect.
    Or perhaps work in an industry/market where it is the predominant language. The Java market is booming right now, much more than C++. Cast aspersions on their intellect if you like, but I might second guess the assertion that a guy making six figures to develop back end web applications for a Fortune 50 company is "dumber" than a hardcore C++ game programmer working twice the hours but making half as much.
    Last edited by medievalelks; 05-18-2009 at 07:08 AM.

  9. #24
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    493
    Quote Originally Posted by brewbuck View Post
    There will be antisocials no matter the programming language. This doesn't reflect badly on Java, just the web site where these unhelpful persons congregate.

    CBoard is a strange beast, halfway between the introductory forums where the most advanced question is why we have to return 0 from main(), and the private mailing lists where the super-experienced debate things we won't often encounter.

    It's not that the other forums are so much worse. It's that CBoard is so much better. A little optimism, hey?
    I completely agree with this.
    If you want a more friendlier forum for java, i would suggest http://www.coderanch.com/forums
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  10. #25
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by medievalelks View Post
    The Java market is booming right now, much more than C++. Cast aspersions on their intellect if you like, but I might second guess the assertion that a guy making six figures to develop back end web applications for a Fortune 50 company is "dumber" than a hardcore C++ game programmer working twice the hours but making half as much.
    This is some very flawed logic. It seems to me s/he could be dumber, and that that was the whole point of Java (to make it easier for stupid people*), which would certainly explain why it is booming (that and the applet). Getting paid a lot of money in any field has much more to do with circumstance AND GREED than it does intelligence. Being able to take advantage of, eg, your social status, just demonstrates that you should not be classified as "mentally handicapped", not that you are particularly brilliant. Let's say "smart for a pig". Otherwise, the leaders of those Fortune 500 companies must be smarter than sin, as opposed to people who perpetually leverage any (fair or unfair) advantage they can discern, regardless of the wider consequences a more intelligent person might discern. Perhaps they have done a smart job with the economy? Not.

    Also, the idea that throwing a lot of money at something (eg by paying some half wit 6 figures) will make it better can quickly be disproven by surfing casually around a few large corporate (or government) web site. Some of them are a total mess on all fronts (functionality, cosmetics, coherence, etc) despite having a price tag in the millions. I don't play games, but I would say by and large game developers have done a much, much more admirable job in developing product during the last decade than "business oriented" web developers, who are just chowing at a trough (I won't blame someone for doing that, but that doesn't mean you merit pride in anything other than your check).

    *I really have no idea or opinion about it, but that is the essential claim of Java proponents.
    Last edited by MK27; 05-18-2009 at 09:16 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  11. #26
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,622
    Quote Originally Posted by zacs7 View Post
    Things that I find (really) suck:
    * No const
    * while(0) is a compile error, whereas if(0) is not.
    I guess I can agree with the first, unless you're allowed to use tuples, and it's easy like it is in python.

    I don't see a problem with a second. All an if(0) statement needs is an else branch to make sense, so why make it an error?

  12. #27
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by MK27 View Post
    This is some very flawed logic.
    I thought one baseless generalization deserved another.

    Getting paid a lot of money in any field has much more to do with circumstance AND GREED than it does intelligence.
    And apparently you agree :-)

    My whole point was that language ........ing contests are silly enough without the insulting of an entire base of programmers. I've worked with outstanding Java developers and I've worked with C++ hacks. I don't draw any conclusion from that other than that there are good and bad programmers in the world, and all kinds in between. Language has little to do with it.

    Anyway, in my experience the smartest programmers are the ones who know how to use multiple tools well, and know when to use each.
    Last edited by medievalelks; 05-18-2009 at 09:41 AM.

  13. #28
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,310
    hmm... both if (0) and while (0) sounded suspicious to me, especially after cyberfish raised the issue of Java not allow implicit conversion from int to boolean (among other implicit conversions). A quick check shows that if (0) is not allowed precisely because of the required conversion of int to boolean. while (false) resulted in a compile error due to the code being obviously unreachable.

    Perhaps such a decision to make it an error rather than a warning is justified, if indeed static analysis can prove rather than merely suggest that the code is unreachable. (Then again, Snafuist pointed out recently that unreachable code is a valid obfuscation technique.)
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  14. #29
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    There are so many stupid comments in this thread that it makes my head hurt. This C++ elitism doesn't impress anybody, and only does a disservice to yourself.
    even the veterans there are apt to respond with things like "why would you want to do such a thing?"
    We do that all the time on this board. That response usually comes after a question that doesn't make sense within the bounds of the language. Something like, "In C++, how do I call my destructor function?".
    antred likes this.

  15. #30
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,636
    >> Perhaps such a decision to make it an error rather than a warning is justified, if indeed static analysis can prove rather than merely suggest that the code is unreachable. (Then again, Snafuist pointed out recently that unreachable code is a valid obfuscation technique.)

    I don't know. It seems to me that this should just be a warning. Unreachable code can be useful sometimes for debugging purposes.

    >> If you want a more friendlier forum for java, i would suggest Big Moose Saloon

    I took a quick look at the site, and it does indeed look promising. Thanks.

    >> This C++ elitism doesn't impress anybody, and only does a disservice to yourself.

    To be fair, I was really only joking (the Jell-O brained Java programmers bit), but to some degree I do feel that C++ is clearly a superior language. Take a look ar Java generics:

    Code:
    public static < Type > void foo( Type data )
    {
    	Type
    		ref = data, // OK
    		copy = new Type( data ); // Error
    	ref.bar( ); // Error
    	ref.baz = 1024; // Error		
    }
    The only way that this can "work" is if you specify the supertype in the declaration! The reason for all of this, of course, is because generics are compiled into bytecode (and reused via "type erasure"). But it still doesn't make sense. A more logical approach would be to either allow a dual facility where compile-time code could use the templates fully but run-time code could only use the more limited "type erasure" feature, or else provide full support with the aid of reflection or whatnot. Instead, the designers of the language chose a half-hearted and, frankly, dim-witted implementation. So while I agree that we probably shouldn't sit around and make fun of people (who could be just as talented as any other programmer), I reserve the right to have an "elitist" attitude with respect to the language itself.

    >> We do that all the time on this board.

    True, but we usually reserve those sorts of responses for the truly ignorant questions.

    >> That response usually comes after a question that doesn't make sense within the bounds of the language. Something like, "In C++, how do I call my destructor function?".

    Just as a side note, there are some occasions where this is actually necessary (think: std::vector, for one).

    >> My whole point was that language ........ing contests are silly enough without the insulting of an entire base of programmers. I've worked with outstanding Java developers and I've worked with C++ hacks. I don't draw any conclusion from that other than that there are good and bad programmers in the world, and all kinds in between. Language has little to do with it. Anyway, in my experience the smartest programmers are the ones who know how to use multiple tools well, and know when to use each.

    Agreed.

    >> "Java is C++ without the guns, knives, and clubs." -- James Gosling

    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

Page 2 of 6 FirstFirst 123456 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. java for c++ programmers book
    By qwertiop in forum Tech Board
    Replies: 3
    Last Post: 05-18-2007, 03:17 PM
  2. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 02:06 PM
  3. Do programmers still like Java ?
    By dot_rain in forum Tech Board
    Replies: 3
    Last Post: 11-23-2003, 08:44 AM
  4. Calling all Java programmers...
    By face_master in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 04-14-2002, 05:43 AM
  5. Programming Puns
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 44
    Last Post: 03-23-2002, 03:38 PM

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