Definitely the second one is better. It's more readable.<br><br><div class="gmail_quote">On Thu, Jun 23, 2011 at 4:20 AM, Richard O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
On 23/06/2011, at 5:44 AM, Icarus Alive wrote:<br>
<br>
> Hi,<br>
><br>
> Of these 2 styles, which one is preferred, and why ?<br>
> To me, the readability of 2nd style is better, tough it consumes 1 stack frame extra.<br>
<br>
</div>Why do you say style 2 consumes one stack frame extra?<br>
It's called via a tail call, so that when mainLoop/0<br>
(whyDoYouWantToWriteUglyUnreadableNamesLikeThis?<br>
 DidTheUnderscoreKeyBreakOffYourKeyboardOrWhat?)<br>
is running there isn't any frame for loopInit/0.<br>
<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Alexander<br><br>