On Fri, Jun 28, 2013 at 1:21 AM, Dr.Ruud <rvtol+use...@isolution.nl> wrote:

> On 28/06/2013 09:08, Charles DeRykus wrote:
>
>  [...]  I was making a case that "do"  in limited cases could be a
>>
>> shorter and/or slightly clearer idiom.
>>
>
> I think the context was if you would ever go as far as using double braces
> to make a loop-construct out of 'do'. But even more how combining a do {}
> with a statement modifier can easily lead to confusion, see the examples in
> perlsyn.
>
> In a serious environment, code should be readable much more than writable.
> So spend the extra minutes to make it as clear and non-ambiguous as you
> can. Then someone else can more easily fix any bugs you introduced, without
> having to ask you a lot of questions, and without having to rewrite the
> whole thing.
>
>
Exactly.  That's why I mentioned 'do'  should probably draw a more explicit
caution in the docs. And I'd agree  double braces to make 'do'  more
loop-like (loop-ish?) is the wrong approach and reduces readability. But,
in a simple scenario,  a  do'  with its  clear mirroring of "do this until
that happens"  can enhance readability.

-- 
Charles DeRykus

Reply via email to