Single exit point
Orbitz - orbitz - November 18, 2005Many programmers insist on only having the flow of control in their function end at a single point. I got wondering for a few minutes if any languages enforce this style of programming. Then I realized. Erlang has no ‘return’ operator, so doesn’t Erlang enforce this? That sounds about right as far as I can see. So an Erlang function can only have 1 exit point. That should make them feel good.
But as was just pointed out to me in the middle of writing this, Erlang has ‘throw’. There can be many of thoughs. So perhaps Erlang doesn’t have 1 exit point.
On a final note:
Does having 1 exit point even matter? Who cares? The beauty of Erlang (in my opinion) is it almost forces you to write short concise functions. Every single one of my erlang functions fits on 1 screen easily, so does having multiple exit locations from there matter? In my opinion, no. I don’t need to go searching through pages of code for that function to find it, I can see it, so who cares?
Categories: Blogs Orbitz
Erlang on Twitter
» Rzkyadtymhdn (Rizky Aditya Mahdini): Linee ~RT @Devandeandra: Ava mu ngakali”@Rzkyadtymhdn: @Devandeandra @Erlang_DSK eh ada iklan Lineee… Yang baru tuh, bitangnya agnes lohh”
» moliware (Miguel Olivares): How and Why We Switched from Erlang to Python at Mixpanel Engineering - http://t.co/iQKO2zTrJN
» coreyhaines (Corey Haines): Preparing for my “Neural Networks and Erlang!” talk tomorrow night http://t.co/ZvJUfuTfpH
» hyc_symas (Howard Chu): For you Erlang fans, a refresh of the Erlang wrapper for #LMDB https://t.co/gUJyWHCYvL WIP
» Devandeandra (Devan): Ava mu ngakali”@Rzkyadtymhdn: @Devandeandra @Erlang_DSK eh ada iklan Lineee… Yang baru tuh, bitangnya agnes lohh”
» AlphaKrieger (Alpha Krieger): @josevalim give me an elevator pitch: Why do I need elixir? And what is it made for, that I can’t solve with Erlang already?
» Rzkyadtymhdn (Rizky Aditya Mahdini): @Devandeandra @Erlang_DSK eh ada iklan Lineee… Yang baru tuh, bitangnya agnes lohh
» masterq_teokure (ジプシー): @nari3 @objectxplosive Erlangですね。エラーリカバリのしくみが知りたかったところもありますが、GCも気になりますね。。。
» nari3 (nari3): @objectxplosive @masterq_teokure むしろ僕にも教えてください :P ガチ変態な奴は読むの大変なんですよね。Erlangとか楽しそうではあります :) (GHCも読んでみたいです)
» zinyando (Lennex Zinyando): How and Why We Switched from Erlang to Python http://t.co/Qrg5CaIw0V
Statistics
Number of aggregated posts: 10648
Most recent article: May 14, 2013
Latest comments
» Moraru on This is Why You Spent All that Time Learning to Program: It is true that computer science was a pain in the back at time that i’ve had to learn it…
» Commercial hand dryers on Couchbase Meetup at new HQ: Buy online from here where you will get so much of variety in Commercial hand dryers for people. If you…
» Fort McMurray Homes on Motivated Reasoning and Erlang vs Python vs Node: I don’t really understand why this post is motivational? I don’t even see a post, just a title. Fort McMurray…