> On Jun 25, 2019, at 22:15, José Valim <[email protected]> wrote:
> 
> It is completely fine to have the discussion here. My point was only that 
> there is quite more work to be done in order to consider this a proposal and 
> this is a complex topic, so the engagement may be poor until more information 
> is available.

Thanks for the clarification (and cautionary advice :-).

Thinking a bit harder about the issue, I realize that my typical use case 
involves
defining lambdas, binding them to names, and then passing them into functions 
that
are embedded in pipelines, eg:

  review_fn   = fn {path, _title, _precis} -> ...
  ...
  |> Enum.filter(review_fn)

In this scenario, I can't think of any reasonable way for the compiler to check
the lambda's arity, let alone its argument types.  However, it does seem that a
tool such as Dialyzer should be able to detect some discrepancies.

So, as a test, I tried adding another parameter to the lambda definition:

  review_fn   = fn {path, _title, _precis, _foo} -> ...

However, Dialyzer did not detect this.  Can someone explain why this might be 
and
whether this reflects a fundamental limitation of some sort?

-r
 

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/D6BE4900-D51B-4ED6-80A2-7400F5A0C869%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to