3 ms·
The latest Erlang release fixed the Map problem with Dialyzer. It was entirely the reason I was lax with specs. I'd love to get a workflow more like this one:
by knewter 10y ago
The latest Erlang release fixed the Map problem with Dialyzer. It was entirely the reason I was lax with specs. I'd love to get a workflow more like this one: https://medium.com/@barruumrex/seeking-simple-satisfaction-2a098902ddff https://medium.com/@barruumrex/seeking-simple-satisfaction-2...
- im_down_w_otp 10y agoFor the uninitiated... Erlang 19's included Dialyzer improves the scenario of type-checking maps in useful ways. Namely that now you can represent an empty map, an arbitrary map of any type, and a partially arbitrary map which must include certain key type and value type associations but is not limited to those. Which leaves out one representation which is a map which includes and only includes a specific set of key type and value type associations. Erlang 18's Dialyzer has basically just #{} =:= map() which is equivalent to the union of #{none() => none()} and #{any() => any()}, so it was basically a giant escape hatch in the type-checking system, and thus not particularly valuable. Looking forward to a pending change in laxness as a result of the coming changes in 19. :-)