C
Chris Angelico
Well, there aren't that many groupings towards which languages
specialize for (not including embedded or other application-specific
domains). There's OS scripting, Web scripting, and then the otherwise
general-purpose "normative" languages in the middle of those two
extremes. But this view presumes a model of computation which hasn't
settled into wide agreement.
So, on what basis _would_ you choose a language for some purpose?
Without speaking specifically of web development here, how do you
choose a language?
* Some languages are just fundamentally bad. I do not recommend ever
writing production code in Whitespace, Ook, or Piet.
* Some languages force you to do a lot of bookkeeping, memory
management, etc. These are inferior unless their corresponding
advantages (usually performance or memory use) justify it.
* Some situations specifically demand one language. If you're writing
code to be deployed on cheap web servers, it's probably going to have
to be in PHP. If it's to run inside a web browser, it pretty much has
to be JavaScript, ActionScript, or maybe something that compiles to
one of those.
But that would still leave you with a good few choices. When it comes
down to it, how do you choose between Ruby, Python, Perl, Pike,
JavaScript, <insert language of choice here>, etcetera? I can think of
a few considerations that may or may not be important... and I'm sure
you can add more.
- Library support. For web work, it might be useful to be able to
create a PNG image on the fly (live graphs and such), or to have a
simple one-liner that handles cookies and persistence.
- Familiarity with the language. Why learn another one when you
already know this one?
- *Un*familiarity with the language. If you're going to have to learn,
may as well charge your boss for it!
- Proper Unicode support. For manipulating text, helps to be able to
work with it as text.
- Lack of proper Unicode support. Maybe it's easier to just work with
bytes everywhere?
- Ease/atomicity of deployment of new versions (maybe even while it's running)
- Buzzwordiness? If your boss asks you to choose a language and you
can say either "Ruby on Rails" or "CherryPy", are you more likely to
get approval for the former?
Something to throw open there. Citations from actual choices made a bonus.
ChrisA