[erlang-questions] My biggest beef with Erlang

Robert Raschke rrerlang@REDACTED
Mon Nov 26 12:08:33 CET 2007


> No this has nothing to do with regexps
> 
> -compile({character_transform, Mod}).
> 
> would (by analogy with parse_transform)
> call Mod:character_transform(Bin, Opts) when Bin was the content of
> the file being compiled
> it would return Bin'
> 
> Then you could do anything you like.
> 
> -compile({tokenezer, Mod}).
> 
> could maybe call a custom tokeniser after character processing and
> prior  to calling any
> parse transforms.
> 
> /Joe
> 

Hmm, strange convergence of ideas in different mailing lists at the
moment (the Lua community is discussing stuff like this as well).

All of these ideas appear "neat".  Because you can start inventing your
own syntax for stuff.  'Tis what computer types love, after all
(although, using the right indentation with the correct editor might
even come before that :-).

But, unless you are designing a domain specific language, you end up
with programs that nobody else can understand.  Even worse, almost
everything (file extension, run-time system, standard documentation)
makes it appear that you are dealing with Erlang.  But when you look
inside, it is _not_ Erlang, but someones idea of a "better" Erlang.

Allowing the dynamic change of programming language syntax was a cool
thing in the 70's.  It didn't work then, and I seriously doubt it will
today.

If there are real merits to new operators and syntax, then these must
be discussed with the keepers of the language.  If the new features
appear worthy, then they might get added.  If they do not get added,
and you still think that you must have them, then create yourself a
new language.  This may be extremely heavily based on Erlang, but it
is not Erlang!  And it mustn't be called Erlang either.

Sorry for the rant, but this stuff is right up there with "coding
standards" in my book.

Robby





More information about the erlang-questions mailing list