Proposed change to libraries

Luke Gorrie luke@REDACTED
Tue Feb 22 20:39:56 CET 2005


Bjorn Gustavsson <bjorn@REDACTED> writes:

> Unfortunately, it is tricky to check that {M,F} is a valid fun. The module
> M might not even be loaded.
> 
> It has been suggested earlier that we should add
> 
>         fun M:F/Arity
> 
> to the language. Unfortunately, we didn't add it in R10B. We could add
> it in R11B.

I think it would be nice if this prints as something like:

  #Fun<M:F/Arity>

so that you can easily see where it's pointing.

I also wonder if people are using {M,F}-funs without fixed arity.
toy example:

  callback(Values, Callback = {M,F}) when list(Values) ->
      apply(M, F, Values).

Cheers,
Luke





More information about the erlang-questions mailing list