[erlang-questions] Design patterns?

Rad Gruchalski radek@REDACTED
Tue Mar 3 14:12:01 CET 2015


There’s an interesting github repository: https://github.com/inaka/erlang_guidelines. Some of these should be taken with a grain of salt.











Kind regards,

Radek Gruchalski

radek@REDACTED (mailto:radek@REDACTED)
 (mailto:radek@REDACTED)
de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/)
+4917685656526

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.



On Monday, 2 March 2015 at 20:20, Judson Lester wrote:

> As I'm becoming more comfortable and proficient in Erlang, I'm finding there there are interesting patterns that begin to emerge that I'm not sure I've seen elsewhere. I'm wondering if there's a collection somewhere, maybe c2 style?
>  
> One example is a complicated data processing: I've started creating a special purpose record and dispatching based on its fields. That includes short-circuiting on errors, constructing syntheses from simpler data, etc. Since I've stumbled onto it, I've been really liking how it can bring the full force of pattern matching to complex processing. I do worry that it's a bit of a smell though. If the processing can be simplified, that might be better, but it's better, imo, than a long ladder of maybe_compute_other_thing style functions.
>  
> And an open question (for me): when to use case/if versus function heads? Roughly, I've been using cases to reformat the returns of a function call, but the decision trips me up every time.
>  
> Judson  
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED (mailto:erlang-questions@REDACTED)
> http://erlang.org/mailman/listinfo/erlang-questions
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150303/70715d86/attachment.htm>


More information about the erlang-questions mailing list