>>>>> "rb" == Richard B <
rbis...@gmail.com> writes:
rb> I always have mixed feelings about the bang functions.
I'm okay with raising an exception; I don't think I've ever caught one
though. In a case where I'd like to run values through a pipeline I'll
use them and not catch the exception, that still feels pretty "let it
crash" to me and handy for a short lived piece of code. Your comments
about many ways to fail is spot on.
As you point out, explicitly capturing the tagged return is good
documentation and a better practice. I differentiate some between
run-and-done code and long lived supervised processes, limiting the fast
and loose to the former.
As an aside: nice discussion. I've been typing more Erlang than Elixir
for the past few months and find that some of what Erlang takes heat for
(examples recently mentioned here: tagged return values and the
verbosity of always including the module name) are things I don't want
to (and don't have to, fortunately) give up with Elixir. I hope the
Elixir culture retains the maybe antiquated seeming but damn effective
-- I was about to say explicitness but I think I mean -- purposefullness
of well written Erlang programs.