mudasobwa

mudasobwa

Creator of Cure

I’ve asked José in person 2 years ago on ElixirConfEU, if we could simply ditch opaque from MapSet declaration, and he answered “with new gradual types the issue’s gone.” It’s not.

I have a handful of MapSet helpers I use in each and every project, like mapset_size/1 guard and smart pattern-matching, and I always hesitate to add it because it enforces me to ignore dialyzer warnings which I dislike.

What’s indeed the issue with making a mapset implementation not opaque (besides it’s academically wrong :))?

0
Post #11
sabiwara

sabiwara

Elixir Core Team

Good question. I used to be optimistic as well but years later I think the only way to do it would be to vendor the implementation of :sets but just replace the signatures to not have opaque. Not a very enticing option either.

Because even after we removed the opaque from our own types and signatures, we’re still getting errors reported because dialyzer knows that the internals are calling :sets and the opaqueness propagates

1
Post #12
— All posts loaded —