[TYPO3-50-general] CGL discussions (misced topics)

Robert Lemke robert at typo3.org
Mon Jun 8 14:04:12 CEST 2009


Hi Karsten,

On 08.06.2009, at 13:03, Karsten Dambekalns wrote:

> Thinking about it I start to dislike if/else without braces at all.  
> The
> only place where such a construct is helpfully terse is simple checks
> followed by throw and no else clause. Hm. Other than that curly braces
> lead to cleaner code and are less error-prone.
>
> What do the others think?

The only situation in which I like one liner ifs and use them is for  
throwing an exception:

if ($hellFreezes) throw new \F3\Hell\Exception 
\HelloTooColdException(...);

Does that confuse you?

Cheers,
robert


More information about the TYPO3-project-5_0-general mailing list