Programming Languages


A wonderful source of information can be found at CMU in Mark Leone's Programming Language Research though these pages are getting out of date.  I think they were last updated in 1997.  There is a Catalog of Free Compilers, Interpreters and Language Tools maintained by Bryan Miller. Keith Waclena documented his Programming Language CrisisProgramming Language Exploration from MIT. There is some nice performance data at http://shootout.alioth.debian.org/ .  Related to this is a page I wrote up about Environments for Teaching Kids to Program and Explorer the World Through Code

ReadWriteWeb suggested 5 Ways to Tell Which Programming Languages are Popular

Languages I Have Enjoyed Using

Common Lisp (especially in the Interlisp-D environment) was my favorite environment for prototyping.  The environment and language made it easy to do just about anything.  In the past people have complained  about size and performance of Lisp environments, but maybe Lisp is more efficient than people think.  The Association of Lisp Users has links to lots of useful resources.  There was a good slashdot Interview with Kent Pitman about Lisp. Alas, while Lisp is a cool language, it seems to lag behind others when it comes to mature, dependable, libraries and interfaces.

Modula-3 (M3) is a systems programming language that supports interfaces, objects, generics, lightweight threads of control, the isolation of unsafe code, garbage collection, exceptions and subtyping. I think that M3 is the ideal language for industrial strength, multi-person projects where you are concerned about life-cycle engineering. When I first started using M3 in 1992 I had hoped the language was going became popular. Sure, the first compiler was slow and produced large executables (primarily due to the large runtime environment.), but the compiler was free and the language and runtime environment were great!  Alas, no such luck.  Now, I think any hope that M3 would catch on has been killed by the Java and C#.  The M3 faithful maintain a Modula-3 Resource Page

Smalltalk-80 was my second favorite environment for rapid prototyping.  Lots of building block which were easy to use.  Like Interlisp-D, the environment was as important as the language from a productivity perspective.  A cool freely distributed implementation is called Squeak and a nice cross development environment called Pocket Smalltalk (Joey's V1.6 is the easiest to use).  Something I don't understand is that Smalltalk hasn't significantly advanced since the 1980s, even though the environment makes it easy to do this.

Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language. It was designed to have exceptionally clear and simple semantics with a few different ways to form expressions. A wide variety of programming paradigms, including imperative, functional, and message passing styles, find convenient expression in Scheme. Scheme is an ideal language for instructional use. I often use Scheme when I need to experiment with different algorithms. Why?  Scheme is very expressive (I don't find myself fighting against the language).   I even have a decent scheme implementation which fits on my PDA.  Schemers.Org and SchemeWiki.org are great places to see what the Scheme community us up to. Check out  readscheme.org for  a good collection of scheme papers.

CLU had a lot going for it (strongly typed with was parameterized, modules, exceptions) even if the syntax was a bit gross.  The only decent implementations were for Vaxen and DECsystems-20s.

Forth is a stack oriented programming language which is typically implemented by a threaded interpreter.  There is a very nice History of Forth which was prepared for the ACM SIGPLAN History of Programming Languages Conference. Back when 16k was a lot! of memory, and a 8080 was a rocking CPU, Forth was really wonderful. In view of the embarrassment of riches when it comes to hardware resources I don't think I will ever do something in Forth again. One of the best books about Forth programming, Thinking Forth by Brody is available for download.

Languages I Often Use

Perl 5 is the ultimate kitchen sink language.  The syntax is ugly and the semantics (at times)  unclear, yet it is extremely useful, especially for system administration tasks. Perl is an interpreted language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. Perl is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). Larry claims that Perl combines some of the best features of C, sed, awk, and sh, so people familiar with those languages should have little difficulty with it.  I hate using perl because I find myself often needing to run a chunk of code before I am sure what it will do, unlike say M3 where what I write does what I think it will do.  The CPAN has a lot of useful scripts and libraries which make it unlikely that you have to start from scratch.  In the last seven years, I have written more in perl than any other language.

C. I dislike C.  No, I hate C!  Alas, for many years I found myself writing C, though it's been almost a decade since I have written much. Often I  needed to update pre-existing code which is written in C.  Other times I need a small footprint, high performance tool.  It's hard to beat hand crafted C for compactness or performance.  I can't imagine using C these days without something like Purify or at least replacements for malloc to track down those ever present memory bugs.  There are many ways to shoot yourself in the foot.  There is a good collection of papers about Programming in C. and C and C++ Style Guides on the net.

Other Languages and Projects

Ruby.  A language which is trying to be as useful as perl, but OO from the ground up.  Python is the closest comparable language.  Many of my web developer friends rave about Ruby On Rails.

Java.  Java didn't break any new ground.  So why all the hype?   There is the "Write once, run anywhere."  mantra.  I suppose, but this isn't new.  What is really good about Java?  Java is the first language to win a large popular following which has a garbage collector,  modules, a decent type system, exception handling, etc.  While I don't like Java as much as M3, it's done a number of things right, and significantly better than C++.  Furthermore there is an ever grow cadre of people using Java, so the language has a bright future. Concurrent Programming in Java by Lea is a good introduction to writing threaded Java.  Sitraka makes some useful tools for Java hackers.

Python is an interpreted, interactive, object-oriented programming language. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems.  New built-in modules are easily written in in C or C++. Python is also usable as an extension language for applications that need a programmable interface. Python uses the unusual approach of grouping statements by indentation. Python provides good alternative to perl, sh, and tcl.

Oberon(2) is the latest programming language from N. Wirth of ETHZ. Oberon2 has extensible record types, multidimensional open arrays, garbage collection, object-oriented support using type-bound procedures (equivalent to methods), read-only export of variables and record fields. Oberon is also an operating environment which runs standard alone or on top of a  traditional operating system.  Oberon proves that it is still possible to make a fast, small, and functional systems. The portable object files are cool. Unfortunately, while Oberon environment lack features that most large scale projects require.  If I wanted a small, rich environment which could produce code for an embedded system, I might think about Oberon, though the "multi-tasking" process model seems like a limitation.  I wish Oberon supported a multi-threaded or multi-process model of concurrency.

Self is a pure prototype language.  I am not sure that anyone is really using Self anymore, and there were very few groups which used Self for real work.   There are a lot of cool ideas found in Self which are starting to appear in other languages and/or programming environments such as the the method splitting and dynamic recompilation.  There is also a  Self on Linux port.

Tcl/TK as an embeddable language is reasonable. TK is a very nice X11 toolkit. As a program language for written medium to large size programs Tcl/TK is ugly, yet many people see to be doing just this. Go figure. I use Tcl/TK when I need to create small X11 tools, or when I need an embeddable interpreter. Tcl Resource Tree maintained by NeoSoft has a good collection of resources.

Standard ML provides many advanced features, including static type-checking (with polymorphic types), automatic garbage collection, higher-order functions, parameterized modules, and a formally-specified semantics. From a formal methods point of view, ML is very interesting. Do people really write real programs in ML, or do they just do proofs? The Fox Project at CMU is trying to prove that ML can be used to build real world systems. Caml and OCaml are a branch of the ML family tree which tends to require fewer resources than Standard ML while providing most of the benefits.  

The Inter-Language Unification system (ILU) is a multi-language object interface system. The object interfaces provided by ILU hide implementation distinctions between different languages, between different address spaces, and between operating system types. ILU can be used to build multi-lingual object-oriented libraries ("class libraries") with well-specified language-independent interfaces. It can also be used to implement distributed systems. It can also be used to define and document interfaces between the modules of non-distributed programs. ILU interfaces are specified in ILU's Interface Specification Language.

SH / KSH / BASH is primitive... but I am an old UNIX guy. If it's a UNIX box you can depend on some SH variant being present. So it's idea for bootstrapping scripts.  Advanced BASH Scripting Guide is a useful online guide.

C# and .NET.  Haven't looked at it yet, but it sounds like I should.

JavaScript: free javascript e-books


Created by Mark Verber