I've programmed in a range of languages. There are some that I really enjoy coding in, there are some I can put up with and there are some that frustrate and bore me. Having an interest in language design, I got somewhat curious about what it is that makes working with some languages more enjoyable than others.
A couple of questions came to me right away. First, there is probably a lot of personal preference here. What makes a language enjoyable for me to work in may well be what makes it frustrating to someone else, and vice versa. Second, languages are tools. I've said often enough that different languages are suited to different tasks, and you should pick the one that best fits the job at hand. How important a factor is whether one enjoys working in the language when trying to choose whether to use it in a project or not?
Personal Preference
I find the more limited range of language features in Java frustrating. I enjoy working in Perl and C# because there are a wider range of language features available to me. I enjoy being able to mix and match paradigms to the task at hand, and like the thought process associated with going through the options and picking the best one (or working out why other people chose a particular one when reading other people's code).
However, someone else may find Perl and, probably to a lesser degree, C# frustrating because the languages have many constructs that you have to learn and be aware of the interactions between to understand the code. They may therefore enjoy working in Java more because it takes less time to work out what is going on with a chunk of unfamiliar code, and you can dig into the changes or fixes that need doing more quickly.
While I know what my preference is on the rich vs. simple language continuum, I can understand why someone may have an opposite preference to me. I'm not sure that one is more correct than the other. I just know what I like.
There are many other things that people like or dislike about languages. Some of them include:
- Strong vs weak typing: those who prefer strong typing probably like it that the compilers makes them insert clear coercions because it catches some more mistakes, whereas those who prefer weak typing may be frustrated that the compiler can't just be smart enough to insert the coercion that they most likely meant for them in most cases
- More wordy vs more symbolic: some people prefer code to read like English, in which case they prefer more "wordy" languages like BASIC; others prefer to use more non-alphanumeric characters for syntax so it looks different to names of things
- Single paradigm vs multi-paradigm: some people feel it is better to have on paradigm almost enforced upon them, such as object orientation. Others find that this limits their creativity and want a much wider choice of language constructs.
There are many, many more; I'm sure people will point out others in the comments to this post.
Does it matter?
I think that, in general, people are more productive when they are enjoying what they are doing. I know that when I'm really enjoying a coding job, I'll tear through it, sometimes churning out hundreds of lines of code per day (working and with tests). Equally, when I'm bored with what I'm working on, I find myself glancing at the latest posts on Slashdot, checking if there's anyone I can bug on MSN or going to brew up yet more coffee. If you've got a language that you enjoy working in, you're potentially going to be more productive.
However, there's a flip side. If you put too much emphasis on what you enjoy working with, you may end up choosing a language that's not well suited to the task at hand. For example, no matter how much I enjoy working with Perl, it's just not the best thing to work with for building a Windows GUI application. If I instead work with one of the .Net languages or another language that has a really good tool chain associated with it for building Windows GUI applications, I'll will likely get the job done much more quickly.
Conclusions
I think it's safe to say that language preference is a secondary issue to choosing the correct tool for the job. First, identify those languages that are suitable for the task. That may be in part related to the language features, availability of compilers or interpreters for platforms you need to run on, what libraries and tools are on offer and corporate or business constraints. Then, if there's still more than one choice available to you, consider personal preference.