Why don't people like lisp?
Paul Rubin
http
Wed Oct 22 00:48:01 EDT 2003
"Andrew Dalke" <adalke at mindspring.com> writes:
> As an example, here's a quick hack of a way to parse a simple
> stack-based language and make a native Python function out
> of it. I am the first to admit that it's ugly code, but it does work.
>
> I am curious to see the equivalent code in Lisp. Here's the spec
You could of course do something similar in Lisp, but normally you'd
just use S-expressions instead of concocting your own weird syntax
every time you want to build a small language into something. Then
you just use the regular Lisp "read" function and the S-expressions
get parsed automatically for you. Your whole parser becomes just one
line of code.
More information about the Python-list
mailing list