[erlang-questions] Erlang vs Clojure

Robert Virding rvirding@REDACTED
Sun Nov 25 03:40:44 CET 2007

On 24/11/2007, Ciprian Dorin Craciun <ciprian.craciun@REDACTED> wrote:
>    For example what if I want to create a special purpose receive
> that has a default pattern that just removes the unmatched messages,
> but allows me to have unlimited number of patterns? Can I achieve this
> with the current macro system? (In your case the macro system should
> allow me to declare a macro with variable number of arguments.)
>    Ciprian.

You can't do this with the current macro package. But as you  probably
understand it based more on C-macros than lisp macros. It also allows you
some cool things which lisp macros can't do, for example expand patterns and
insert values anywhere.

You would probably actually need something which is a combination of both.
If you were doing it in Erlang syntax something with a parse transform would
do the trick. But working on Erlang syntax code is messy.

They are actually a terrible hack. :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071125/9ad60100/attachment.htm>

More information about the erlang-questions mailing list