nyteschayde wrote:
Asking a site full of Amiga programmers, err I mean users, if they like Java is the same as asking for punishment. Java, as a language, is a good one. Most modern computers can run Java well enough to use it as a substitute for most types of applications.
Couldn't have said it better myself. Why is it always the most clueless that are the loudest and most opinionated?
That's a very good point. The choice is programming language should always depend on context. Which tool is right for the job? If you're just knocking up a simple command line tool an interpreted language (scripting language) is a valid choice. Java would be overkill in that case. While I don't care much for Java, it doesn't mean I'd never use it if it was the most obvious choice.
My personal preference is C/C++, but I'm well aware of the inherent problems with these languages. You need to spend time, carefully planning a strategy for resource handling because of the lack of garbage collection. Another problem is that it's easy to introduce subtle bugs that the compiler doesn't pick up, for example implicit type conversions that you didn't really intend. C++ is slightly better here.
As for portability it's already been mentioned that the standard libraries are sometimes implemented in different ways. A good example is the BSD socket library (while not part of the C standard library, it's still THE standard network library in C/C++). In one implementation a function may take a 'char' as an argument, while under another implementation the same function may take an 'int'. Because a C compiler allows implicit type conversions (as noted above), you'll often not even be warned about your mistake. The socket library under Win32 is based on BSD sockets, but it's full of these subtle differences.
So the answer to the question if C and C++ is portable, is "Yes, and no.".