[erlang-questions] Erlang and syntax.

Mikhail Gusarov <>
Sat Feb 22 22:33:39 CET 2014

> But when you see unknown function you still have no idea what it does and
> you have to figure it out. Any abstraction works in same way.

There is subtle difference: all functions conform to the function
abstraction: function does not alter/capture names from calling
namespace and function does not arbitrarily transfer control. Function
is a simple abstraction: it accepts arguments and returns result.

As a result, function abstraction allows one to selectively ignore
parts of the code while reading it (which was the driving force behind
structured programming). This luxury is not available to readers of
programs in languages with macros (unhygienic ones), especially if
those don't distinguish macros and functions syntactically.

So, macros are new GOTO statements: they are powerful tool, but power
results in harder-to-understand programs.

Best regards,
Mikhail Gusarov.

More information about the erlang-questions mailing list