RES: [PHP] Re: problem with my login script
| From: | Samuel Lopes Grigolato | Date: | Tue, 02 Oct 2012 11:40:11 +0000 |
| Subject: | RES: [PHP] Re: problem with my login script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-319331@lists.php.net to get a copy of this message | ||
I follow this rule of thumb: small blocks of highly understandable code. If this demands ternary
conditionals or breaks, so be it!
-----Mensagem original-----
De: Tim Streater [mailto:tim@clothears.org.uk]
Enviada em: terça-feira, 2 de outubro de 2012 08:37
Para: PHP General List
Assunto: [PHP] Re: problem with my login script
On 02 Oct 2012 at 12:07, Maciek Sokolewicz <maciek.sokolewicz@gmail.com> wrote:
> On 02-10-2012 11:59, Bálint Horváth wrote:
>> The problem was already solved. I forgot to send a copy to the list...
>>
>> Rodrigo, break!? Ohh man, it's a crazy idea... A developer DOES NOT
>> use break at all (in a loop)... (switch is an exception)
>
> I personally find this statement to be utter bullshit. There is
> nothing wrong with using break. There is a very good reason why it's
> available in the language. In very many cases, it costs a lot less
> code to add a break than to add additional clauses to your while-conditional.
Agree 100%.
--
Cheers -- Tim