[erlang-questions] Nested Case Statements v.s. multiple functions

code wiget codewiget95@REDACTED
Tue Sep 26 17:43:54 CEST 2017


Thank you all for your replies, I went ahead and changed my function names and added guards, and it now looks far cleaner.

One thing that I keep seeing in this thread though is some variant of “crash early, crash often,” and this is a little troubling. What if you are writing a program that is receiving a messages and has a queue awaiting action? If the program dies, those messages will be lost, and if the calling processes made ‘casts’ then those messages won’t ever be delivered or processed. Also, it takes a bit of time for the supervisor to re-initialize the process, and this could be bad. 

Is it always a good idea to “crash often” when bad input is received?

Thanks for all of your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170926/963c1cb4/attachment.htm>


More information about the erlang-questions mailing list