Why (did you) study languages? (A non-exhaustive list)
New languages come along all the time, often accompanied by
massive hype. You must learn to develop some taste and see
through the hype to a language's technical core. The ability to
evaluate languages will make you a better programmer, and a
better technical leader (whether of a product group, an IT/IS
department, or an open source project).
When you get to the real world, you will be shocked at the
diversity of programming languages in actual use. Windows GUI
applications written in C++ are only a tiny portion of the
software world. Using one language and one environment limits
your career choices.
Languages teach you to think in diverse ways. Each (good)
language learned is another weapon in your intellectual arsenal.
Good designers use the appropriate paradigm for the problem,
whether it be functional, object-oriented,
declarative/constraint-based, etc.; and they can apply these
paradigms in various implementation languages.
Some languages make you measurably more productive than
others. High-level languages provide you with powerful tools
for abstraction and verification that lower-level languages
lack, so that you can write code that does more in less
time.
There is no One True Language. No one language is ideal for
everything, even within a single project! For example, dynamic
languages like Smalltalk are ideal for quickly writing
prototypes, to understand your problem domain. Once the
prototype is written, you can write the "real thing" in a more
efficient, statically typed language. Similarly, if you wanted
to write a symbolic manipulation program, Java is probably not
the best language---ML, Scheme, or some other Lisp dialect would
make your life easier. But you might want to link your Scheme
interpreter to C libraries for efficiency in critical sections
of code.
Further study: topics for which we had no time
Exceptions: are not just an ML feature. They are the most
common way of expressing error conditions in Java and other
langauges. Sun has a lot of online documentation, including a
tutorial with a chapter on exceptions; read it at
java.sun.com.
Scripting languages: are lightweight, dynamic languages for
rapid, low-overhead development. Often come with lots of
convenient libraries. Examples: Python, Perl (blech), Visual
Basic (blech), etc. These should be easy for you to pick
up.
Logic and constraint languages: What if you could write code
that just specified the logic of a program, but not the control?
For example:
abs(X,A) :- X >= 0, X = A. /* a CLP(R) "relation */
abs(X,A) :- X < 0, -X = A.
?- abs(1, X). /* CLP(R) query */
X = 1
*** Yes
?- abs(Y, 2). /* Another query; notice that it goes */
Y = 2 /* in the opposite "direction". */
Y = -2
*** Yes
Domain-specific languages: not all languages are for
general-purpose programming. For example, SQL is a language
only for querying databases, and it looks and acts very
differently than a general-purpose language.
Keunwoo Lee
Last modified: Wed May 30 21:54:07 PDT 2001