Table of Contents for Programming Languages: a survey

Chapter : runtime features

separate stacks


chapter: compilation/interpretation



static and dynamic linking


some platforms have bytecode by default but also support native code generation (e.g. .Net: )

just-in-time compilation



stack trace

core dump


DWIM stands for Do What I Mean. It was a feature of an old Lisp dialect called Interlisp. In this dialect, the compiler/interpreter would, upon encountering an error, attempt to 'patch up' the program to do something sensible. For example, DWIM might correct DEFINEQ((FACTORIAL (LAMBDA (N) (IFFN=0 THENN 1 ESLE N*8FACTTORIALNN-1)))) to DEFINEQ((FACTORIAL (LAMBDA (N) (IF N=0 THEN 1 ELSE N*(FACTORIAL N-1))))) (example from ).

According to Thomas Bushnell in a discussion in March 2002 on comp.lang.lisp ( ), "DWIM was a great experiment, I think; in the sense that it was worth trying, and produced a fairly clear conclusion: "bzzt, not the right way.". According to Kent Pitman in , a desire to have an ARPA-funded Lisp which did not have DWIM was one of the motivations for Common Lisp ( , as well as the March 2002 comp.lang.lisp discussion ( )).

One complaint about DWIM from Thomas Bushnell was that "DWIM has a near-disastrous non-locality effect. A given piece of code will be patched up to look "sane" given the current feature set of the system. But when the feature set changes, the "nearest sane patchup" may well be very different." ( )

According to Kent Pitman in ( ), there were various horror stories involving DWIM, and "One of them I heard went like this (and again, I can't even say if this is an actual story of what DWIM would do but it gives you the idea of what it had license to do and why people both liked and feared it): A user didn't know how to use the DECL facility so figured they would just say (DECL) and that DWIM would help them. [This shows the trust aspect of a user who likes DWIM.] DWIM realized that DECL was not actually a function name so searched for a name to substitute that was better. It found DEL. [I think that was the name. It's been many years now and I'm doing this from memory. The function it found deletes files, anyway.] DEL isn't a function of no args so DWIM "helpfully" assumed (DEL NIL) to pad out a good number of args. But NIL was a wrong type of argument, so DWIM concluded a wildcard would be most appropriate ... Well, you get the idea. A lot of people just wanted DWIM turned off, and you can sort of see why. If you think Common Lisp has fuzzy semantics, or you think some of my stories about Maclisp make it sound like the unruly wild, wild west of Lisp, you should think of Interlisp as all the more --- well, not unruly but weirdly ruly.

BUT, you couldn't just turn DWIM off because it had been around a long time and lots of code needed it to survive."

Seeing lower-level implementation

In Python you can see Python bytecode with 'dis'. In Ruby you can see bytecode with . You can see assembly in Julia with code_llvm and code_native, and in Common Lisp with 'disassemble'.

In Common Lisp you can add extra optimization to certain functions by e.g. '(optimize speed (safety 0) (debug 0))' (see e.g. ).

Chapter : other contributors to language success

library breadth quality selection of canonical libraries



momentum, momentum at the top (absent dictator?)



best practices

not scary


  typing helps

Some features of some IDEs: