[erlang-questions] Maps branch and disclaimers
Chris King
colanderman@REDACTED
Wed Oct 30 15:38:35 CET 2013
On Wed, 30 Oct 2013 10:24:20 -0400, Björn-Egil Dahlberg <egil@REDACTED>
wrote:
>
>> BTW, is there a plan for a type notation for these new maps, or for how
>> to get Dialyzer to usefully >>type-check them?
>
> Yes. The type notation is the same as with other terms.
Ya, I just found that and posted a separate e-mail with my analysis. I
believe the type signatures to be inconsistently specified.
> How well Dialyzer would be able to handle it is a different matter. I
> plan to make them really stupid at first, >meaning opaque map(). Later
> incarnations of dialyzer could be increasingly smarter.
I think it will be very difficult for Dialyzer to automatically tease
apart the homogeneous (list-like) and heterogeneous (tuple-like) use
cases, even if they are not mixed. In particular, as I mentioned in my
other e-mail, the useful type variance in the heterogeneous use case is
the opposite of the useful type variance in the homogeneous case. (i.e.,
we want to know that a heterogeneous map contains *at least* some keys; we
want to know that a homogeneous map contains *at most* some keys).
Maybe I am wrong – I hope I am – but without a plan and without the
hetero-homogeneous distinction, I fear "later" could be "never".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131030/a74e8fae/attachment.htm>
More information about the erlang-questions
mailing list