[erlang-questions] Serl 0.1 Release Announcement

Howard Yeh <>
Thu May 29 10:57:29 CEST 2008


Hi,

I've been hacking on a Lisp front end for Erlang during the past few
months. It might be worth a look if you like common-lisp.

Serl is a S-exp based frontend designed for Erlang. If you like
Scheme, you might want to try LFE, but if you like Common-Lisp and its
comparative hairyness, Serl might be for you.

Against Lisp's syntatic purity I have sinned. Serl's syntax is
inspired by Lisp, Erlang, and Ruby (thus transitively Perl (*gasp*)).
That Serl rhymes with Perl is perhaps more than an unfortunate
accident.

X => variable
{} => tuple
[] => list
foo => atom
## And the Perlish part,
(foo .if (test)) => (if (test) (foo))
(bar .cdr .car) => (car (cdr (bar)))


Serl is mostly implemented in itself. I've found, so far, that the
apparent syntatic complexity doesn't make metaprogramming with
Common-Lisp style macro any harder. The syntatic extensions are
designed such that they are pattern matchable, and that they are all
"list-like". So even though Serl looks a bit more complex, the macro
programmer still works primarily with lists.

Pattern matching is a godsent.


-support for aribtrary namespaces.
--import/export of macros and special forms.
--special forms are just macros that takes the compiling environment
as an extra argument. Serl defines itself with special forms.

-avoids unintentional capturing in similar way as common-lisp's package.

-Syntax objects.
--Quotation and quasiquotation are used only to build syntax objects.
-macroexpansion in pattern.
--so named patterns are possible.
-syntax objects are pattern matchable.

-fancy lambda-list as in common-lisp.
--but unlike common-lisp, &option, &rest, and &key don't interfere
with each other.

-syntatically consistent reader macro based on heredoc.

See:

http://forum.trapexit.org/viewtopic.php?p=43927

Howard
-- 
hayeah.wordpress.com
   --metacircular thinking



More information about the erlang-questions mailing list