[erlang-questions] My biggest beef with Erlang
Sun Nov 25 14:48:57 CET 2007
--- Joel Reymont <joelr1@REDACTED> wrote:
> On Nov 25, 2007, at 3:12 AM, Robin Bhattacharyya
> > Smerl manipulates erlang at the abstract form, so
> smerl is kinda like
> > a lisp macro. A lispy erlang would make erlang
> easier to manipulate.
> My biggest beef with Erlang is that even with parse
> transforms I
> cannot make a !! b stand for funcall(a, b). If the
> implementation removed this restriction then surely
> all sorts of
> creative uses would be enabled.
In other words, you want user-defined infix operators.
The easy way, Haskell-style, took a couple of hours to
implement a few years ago (recipe: modify lexer to
recognize infix-op tokens, then add an extra rule to
parser to handle them), but got bogged down in the
usual bureaucracy and kibbitzing. So this time, first
write an EEP and you're set to go.
The hard way would be something like ML or Prolog full
infix syntax (and prefix, postfix, and different
associativities for Prolog). I think that can safely
be left for later.
Never miss a thing. Make Yahoo your home page.
More information about the erlang-questions