Results tagged “Programming languages”

Some time ago I stumbled over a neat trick in programming languages which understand C++-like comment lines (single- and multi-lined comments). This allows toggling between two different blocks of code by just adding or removing a simple '/' character in the first line.

    /*  <<- Add/remove one '/' here to toggle active code block
    String mode = "release";
    /*/
    String mode = "debug";
    //*/

I found this somewhere on Stackoverflow.com but couldn't locate the article containing this again. I found a reference to this here but I guess this trick is much, much older than this article.

|

Every now and then the well known and never-ending discussion of the "best" programming language comes up. Often this drifts into the direction where people compare specific language capabilities and features and how specific problems can be solved so much easier than in the other language(s).

When I'm caught in such a discussion people often assume that I'm a Java evangelist. But I always try to make clear, that I try to focus on solutions and problems rather than Java features. It's just that when I need to make examples, I use Java because it is currently the language which I know best. This doesn't mean that Java is the best language for the job.

I always try to make clear that I think that different languages always have a specific goal or type of problem which they can handle better than other programming languages. Take for example C/C++ for creating fast and efficient binaries, Perl for excellent handling of large quantities of strings, Shell scripts for quick automation of system management activities, PHP for fast creating dynamic web content, and so on... Of course I know that every of these exercises can be solved with almost every other language as well but the difference is, how fast and understandable the result can be produced. Creating a webserver with shellscripts is possible but I certainly wouldn't try it.

So, once and for all: I think almost any language has its area of excellence and there is no such distinction like a better or worse language. ie. Java is not better than C# nor the other way round.

Of course, if there hast to be a decision made on choosing a language this decision cannot be solely based on which language would be the best for the present problems. One has also to take into account, which languages are known by the developers and how well they know them. Furthermore one has also to be aware that available frameworks for languages often can change the capabilities of languages and how this language can be applied to certain types of problems.

|

1

Archives