[erlang-questions] Process declarations

Christian S <>
Thu Oct 5 10:21:57 CEST 2006


On 10/5/06, Joe Armstrong <> wrote:
> Thinking out loud....

Ditto.

> Tomorrow??
> ==========
> process bar(X) ->
>     receive
>        X -> ...
>     end.

> Proposal 2 (Conservative)
> =========================
> -process([bar/2]).

In the past there was talk about marking some functions as side-effect
free so they could be allowed in guards. User defined guards.

http://www.erlang.org/ml-archive/erlang-questions/200309/msg00263.html



What I'm getting at is that perhaps one want a more generalized
'mark-up-this-function-as-a' feature.

-fundef(foobar/1, [process, {doc, "Awaits an X and returns an ellipsis."}])
foobar(X) ->
    receive
       X -> ...
    end.


My god that looked ugly. But it reuses syntax we know. The 'doc' part
is inspired by common lisp's docstrings (short-descriptions
(of-function (features))).



More information about the erlang-questions mailing list