2009-02-17

Porque é que Lisp é diferente

Para os aventureiros e curiosos, nada como espreitar um óptimo e gratuito livro de Paul Graham sobre a linguagem LISP, a "linguagem de programação que é programável". Em vez de falar das coisas do costume - aquilo que vemos no dia-a-dia nas prateleiras das livrarias, Paul Graham apresenta o que esta linguagem oferece de diferente. «What can you do in Lisp that you can’t do in other languages? One of the most distinctive qualities of Lisp is the way it can be tailored to suit the program being written in it. Lisp itself is a Lisp program, and Lisp programs can be expressed as lists, which are Lisp data structures. Together, these two principles mean that any user can add operators to Lisp which are indistinguishable from the ones that come built-in.»

A explicação do autor é impressionante e contraria a filosofia "Top Down" que existia no mundo da programação:

«Design by Evolution: Because Lisp gives you the freedom to define your own operators, you can mold it into just the language you need. If you’re writing a text-editor, you can turn Lisp into a language for writing text-editors. If you’re writing a CAD program, you can turn Lisp into a language for writing CAD programs. And if you’re not sure yet what kind of program you’re writing, it’s a safe bet to write it in Lisp.

Whatever kind of program yours turns out to be, Lisp will, during the writing of
it, have evolved into a language for writing that kind of program.
»

Sem comentários:

Enviar um comentário