On Mon, May 3, 2010 at 12:35 PM, Samuel W.
[email protected] wrote:
I think C++ is generally not a good language for teaching programming It probably depends on the level of the student and what they are trying to achieve.
But thanks for pointing that out.
Just to reinforce the point. Computer language are neither inherently
interpreted nor compiled. This is an aspect of an implementation.
There’s also a bit of fuzziness in what compilation vs. interpretation
means. At one end of the spectrum is an implementation which compiles
source code into the native machine instructions for the target
platform, at the other end is one which re-parses source code every
time and interprets it. There are very few implementations at the
second end of the spectrum, most ‘interpreters’ actually ‘compile’
source code into some intermediate representation for
The MRI implementation of Ruby pre-1.9 ‘compiles’ ruby source into an
abstract syntax tree. Ruby 1.9 compiles to what are effectively
instructions for an ‘artificial’ virtual machine, this is similar to
how most Java implementations work, with detail differences.
Similar ‘byte’ coded VMs have been used for implementations of
languages such as C/C++ which are normally compiled to machine code.
And there are cases where such implementations can outperform
‘traditional’ implementations on some platforms, because the
executable code is more compact, keeping the working set size down and
reducing virtual memory swapping/paging overhead.
Lisp one of a triumvirate of the earliest programming languages (along
with FORTRAN and COBOL) has a traditional implementation similar to
Ruby 1.8, aided by the fact that Lisp is a homoiconic language which
makes the ‘compile’ part particularly early. However, Lisp too can be
compiled, the Scheme dialect, developed by Guy Steele and Gerald
Sussman at the M.I.T. AI lab in the mid 1970s-early 1980s provided a
hotbed for such activities.
Sussman and Steele’s original ‘Lambda Papers’ are seminal works which
have informed quite a few language designers.