News for hackers. Stuff that matters.
Re:Elixir's “Set Theoretical Type System” prototype/demo/sho... by masklinn on Wednesday June 14, 2023 @03:24AM (#36322615)
It’s how types have been specified in erlang for 20+ years: https://www.erlang.org/doc/reference_manual/typespec.html

If you look at any erlang api doc, you’ll see predicate-like type specs. Conveniently, it naturally supports generics by just adding “parameters” to the predicates, so a dict would have type.

It works fine, and makes things less ambiguous, as erlang “types” can contain enumerations of values, in the original spec it’s clear that `integer()` is a type and `false` is a value, in your version not so much.

There are no comments on this comment yet.