Arggggg!
By Adrian Sutton
I’d seen a link to this a few days ago and it was presented in such a way that it seemed like an intelligent discussion of the relative merits of C++ and Java – certainly the reply I read was. I didn’t have time to read it until now and I’m extremely disappointed. If I could remember who linked to that rant I’d probably give up reading their blog. I’m not going to bother rebutting most of the article, there are plenty of incorrect statements in it just as there are plenty of incorrect statements in every article like it comparing any two languages. How hard is it to make people understand that they should choose the right language for the right job? XSLT is a good language for manipulating XML, Java is a good language for cross platform work, high level apps, applets and a bunch of other stuff, C is good for writing low level stuff, speed critical apps (or speed critical sections of apps), as is assembly, C++ is good for a bunch of stuff, perl is great for a bunch of stuff particularly quick little scripts to manipulate text files, shell scripts are great if you need to perform a bunch of file operations or combine a bunch of small pre-existing tools. Prolog is good if you need a solid logic processing/reasoning engine, HyperCard is fantastic if you want an easy to comprehend language with extremely rapid development, MetaCard is great if you need a cross-platform HyperCard or just hit up against HyperCard’s limits. Javascript is a great language if you need to add dynamism to web pages, Visual Basic is great if you want a rapid prototyping language or a simple GUI tool, .Net is probably even useful if you can make the #*(#@ thing work… I’ve programmed in all of those languages and probably many more, they all have strong points and weak points but if you want to succeed at using any of them, you have to stop trying to use them like they were your “favourite” language. You will always think Java is crap if you try to write C or C++ code in it – it has a different paradigm and a different way of doing things. By the same token you will always hate .Net if you try to write Java code in it (trust me I hate .Net because of that). The idea that if you can program in one language you can program in any language by just learning the syntax is completely wrong. You have to learn the syntax, then you have to learn the paradigm, then you have to learn the best practices, then you have to gain experience and finally you have to accept the philosophy of the language and stop trying to beat it into submission. In short, learning a new language is just that – a learning process. You can’t expect to know everything and you must go into it assuming nothing and learn from scratch – everything you have come to expect and assume about your programming language may have changed and you need to find out if it has or not. If you find yourself criticising the programming language constantly you’re doing it wrong. Thousands of people are most likely happily using that exact same programming language without cursing and swearing – do you really think you know better than all of them?