[erlang-questions] preferred looping style

Alexander Krasnukhin the.malkolm@REDACTED
Thu Jun 23 15:33:56 CEST 2011


Definitely the second one is better. It's more readable.

On Thu, Jun 23, 2011 at 4:20 AM, Richard O'Keefe <ok@REDACTED> wrote:

>
> On 23/06/2011, at 5:44 AM, Icarus Alive wrote:
>
> > Hi,
> >
> > Of these 2 styles, which one is preferred, and why ?
> > To me, the readability of 2nd style is better, tough it consumes 1 stack
> frame extra.
>
> Why do you say style 2 consumes one stack frame extra?
> It's called via a tail call, so that when mainLoop/0
> (whyDoYouWantToWriteUglyUnreadableNamesLikeThis?
>  DidTheUnderscoreKeyBreakOffYourKeyboardOrWhat?)
> is running there isn't any frame for loopInit/0.
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 
Regards,
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110623/7a29d121/attachment.htm>


More information about the erlang-questions mailing list