I find this really interesting - it feels like one of those things where the “clean” version is what I know I should do, when I get round to doing it “properly”. When trying things out or trying to work up some logic in Erlang I tend to … I guess “spitball” in the first style, not so much with inline funs but definitely with the list comprehensions, because it feels like a natural way to, I don’t know, agglutinate what I’m thinking into something that works. I know it’s bad while I’m doing it and never for a moment think it should stay in the module - sometimes it does, but the interesting thing is when I then sit down and work out how to factor out the bad inline stuff into more explicit, simple, easier-read blocks like the later versions, that’s when the bugs and the edge cases start to become clearer. So I guess I agree with the thrust of the article, that it seems evident that simpler, shorter, more broken-down logic and structure is better, but I don’t get so agitated about it because I feel like what’s needed is not so much a matter of disagreement about what’s right and wrong but more a recognition that the “spitball” style gets you to where you can understand the problem space enough to be able to attempt the “proper” style - and maybe a slight elegiac nod to the facts that #1 sometimes the former gets left in place and #2 I guess this makes me a diehard hacker and bumbler rather than and elegant contemplative and designer. ¯\_(ツ)_/¯
Anyway, thanks for posting it, the author posts some really knowledgeable & well-considered stuff on the Erlang list, so it’s good for this ingénu to know even the wizards still consciously take this stuff into account!
(not really but what a waste of time)
What did you find to be a waste of time? I found it to be a good explanation of an Erlang practice.
Edit: also, the erlc tip found helpful.
It’s a badly written and terribly constructed weak argument for a tendentious position. These sins are then compounded by the author insecurely insisting that their position is obviously right and also cursing like they’re ten.
I didn’t really have a problem with the inline ones. Much less think it made the author look like a douche bag.