I second what Ben said. {:ok, t} | :error isn't doable as it isn't
"universal", sometimes you have just :ok and sometimes just :error for
example. I think both as far as clarity goes as well as as far as
conciseness goes the best solution is to use nil | t.
On Tue, 27 Feb 2018 at 13:31, Ben
maybe(t) is traditionally `Some(t) | None`, which isn't really the same as
`nil | t`. The closest analogue would seem to me to be `{:ok, t} | :error`
although that doesn't quite communicate the same thing.
On Tuesday, February 27, 2018 at 7:11:39 AM UTC-5, Yordis Prieto wrote:
>
> Introducing
Introducing `maybe(t)` it will reduce the boilerplate code for `nil |
something`
It is more convenience to write it this way, at least for me.
What are your thoughts about it?
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
To
Hi,
Sounds reasonable but may not work as good. This may change a lot of user
formatted code and produce extra diffs in tests. If we could only reformat
a part of the AST (one function call in our case) this would be ideal.
Thanks,
Serge.
On Monday, February 26, 2018 at 2:31:01 PM UTC+2,