Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@p @j @Junes @SilverDeth @CrayonEater @ElDeadKennedy @ceo_of_monoeye_dating
>Until you have to debug and it matters which of the clauses failed.
In reality you should wrap it all in a tuple for error handling which makes the issue clear, but it is true that it isn't the case in most code people write, including Pleroma
with {_, true} <- {:check_one, check(var)},
{_, true} <- {:check_two, check2(var)} do
process(var)
else
{:check_one, e} -> {:error, :check_one, e}
{:check_two, e} -> {:error, :check_two, e}
end
>rails
I think it is fair to say that Ruby is hot garbage. Especially if you need something that doesn't perform awful.