Dynamic language

James Miller james at aatch.net
Thu Mar 15 13:58:23 PDT 2012


On 16 March 2012 09:38, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> (P.S. From what I heard, Lisp trumps D in metaprogramming abilities, but
> I don't know Lisp so I can't comment on that.)

Greenspun's Tenth Law states that any time a programming language adds
a new feature, it moves closer to becoming a poorly-made Lisp.

While this is obviously slight hyperbole, Lisp is ridiculous in how
you can pretty much just add new features to language using the
language itself. The syntax is weird, but I guess its just one of
those "You just get used to it" things.

For example, CLOS is the Common Lisp Object System, and provides OO in
Lisp. It is written /in/ Lisp. It supports all of the traditional
polymorphism and encapsulation and all that, but also provides support
for extending objects by defining before and after methods, fine
grained control of how parent functions get called, all sorts of
things like that.

And while people talk about Lisp's macros, they often don't even
realise that Lisp's macros are actually just one part of set of tools
for generic programming and language extension.

The only thing that drove me off Lisp is how different the development
process is to regular programming. It uses image-based development,
rather than source-based, and I still don't get how that's supposed to
work. Some things are fairly esoteric, things like cons lists, car and
cdr, I don't really get it, and the mental hurdle is ridiculous.

On top of that, there is surprisingly little newbie-friendly
documentation on it. There are tutorials and all that, but most focus
on the language, not the development process. It gets really hard to
figure out what to do when the interpreter is giving you some strange
message and asking you a question that you don't understand.

Well that's my experience with Lisp.

--
James Miller


More information about the Digitalmars-d mailing list