<div dir="ltr"><div dir="ltr">Den tors 21 jan. 2021 kl 21:29 skrev Sean Hinde <<a href="mailto:sean.hinde@mac.com">sean.hinde@mac.com</a>>:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><div>Beginners writing such large functions they fall into the trap of variable re-use from far above the match would receive the wrong lesson though - they should take this as an indication to make their functions smaller rather than be encouraged to just make big functions littered with carets.</div></div></div></blockquote><div><br></div><div>If you look at those diffs I posted, it only takes 10-20 lines and a bunch of complicated tuples with many variables before it gets quite hard to see what's what. And there are many many functions larger than that in typical Erlang code out there. Even if you encourage people to keep their functions short, they will in any case need to dive into existing and unfamiliar code and understand it; maybe onboarding on a new job, or just switching teams. The code won't be littered with carets; there won't be more uses of already bound variables than today, i.e. a couple of times per module, on average. But they're not hidden logic bombs anymore.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><div>The change of culture resulting from this change could reduce the overall quality of Erlang code.</div></div></div></blockquote><div><br></div><div>My bet is that the reverse will happen - people will be more aware of how bindings flow between producers and consumers, and will be less fearful of making changes to clean up confusing code.</div><div><div><div dir="ltr" class="gmail_signature"><br>        /Richard</div></div></div><div dir="ltr" class="gmail_signature"><br></div></div></div>