»I've come to the conclusion that any programmer that would
prefer the project to be in C++ over C is likely a
programmer that I really *would* prefer to [move on], so
that he doesn't come and [disturb] any project I'm
involved with. (...)« (Linus Torvalds, 2007)
http://lwn.net/Articles/249460/
Well, between C and C++ you can argue.
<
I think Wolfram dealt a devastating blow to LISP by spurning it very
publicly and choosing C to write Mathematica. So how about a Git in
LISP?
I wonder what this Linux Torvalds fella would say about LISP? "All
CONS, no PROS" or something like that?
they are not that much suited to the same things I think.
LISP is good at doing fancy things;
C is good at doing things fast (and deriving lots of flexibility from its
lowlevelness...).
LISP can't do many things C does well, nor does it interface so well with
this otherwise C-based world;
C can be made to do many things LISP can do, even if not by default, and
winning no real prize in "elegance"...
LISP uses S-Exps (thus, a syntax both obscure and often disliked by people);
C uses a relatively fammiliar syntax (granted not one always well liked).
typically, people desire a language that does most common things acceptably,
than a language which does some (relatively obscure) things well, but
everything else not so well, if at all...
on average, these tradeoffs favor C...
as noted, C can be used to implement much of LISP's featureset, including:
Garbage Collection; Dynamic Types; CONS, Lists, Symbols and Keywords, ...
(this is done via making all of this work via an API...).
closures can be faked purely in C, but with implementing an (in-app)
assembler, one can give them the "look and feel" of real function pointers
(in the "closure" itself, scope-capture, ... can be done manually...).
likewise, C compilers can have them added as an extension (all this done by
the compiler+runtime), though granted "language extensions" may fall outside
the definition.
having implemented much of a compiler framework, I gain additional
abilities:
I can dynamically compile code fragments (and patch many pieces of existing
code, ...);
reflection is possible (via lots of metadata "mined" by said compiler
framework);
...
FWIW, if we allow a "defmacro" consisting of printing C syntax into a buffer
and feeding it through "eval", this can be done as well...
and, as well, C goes on doing the things C does so well...
so, in a general sense, they are not so evenly matched, C shows the net
advantage...