So I have very little experience with elixir, but I appreciate the effort to bring static typing. With that said, I find the use of parenthesis pretty hard to read. As in I need to spend more time than a quick glance to grok what's going on. Maybe it's because I'm not familiar with the ecosystem, but coming from a typescript, python, and go background mostly, I find this
negate :: ((integer() -> integer()) and
(true -> false) and (false -> true) and
(a -> a) when a: not(integer() or boolean()))
harder to reason about quickly than say this
negate :: (int -> int) & (true -> false) & (false -> true) & (a -> a)
when a: ~(int | boolean)
Is there a reason that syntax was chosen? Is it just for showcasing purposes or is that basically just how the language works?
negate :: ((integer() -> integer()) and (true -> false) and (false -> true) and (a -> a) when a: not(integer() or boolean()))
harder to reason about quickly than say this
negate :: (int -> int) & (true -> false) & (false -> true) & (a -> a) when a: ~(int | boolean)
Is there a reason that syntax was chosen? Is it just for showcasing purposes or is that basically just how the language works?