On Sat, 2006-07-22 at 21:48 -0400, D. Michael 'Silvan' McIntyre wrote:
> And the prize goes to the author of this little jewel here:
> 
>     NoteCharacter body = getCharacter
>         (charName,
>          params.m_highlighted ? HighlightedColour :
>          params.m_quantized ? QuantizedColour :
>          params.m_trigger ? TriggerColour : PlainColour,
>          inverted);
> 
> Nested trinary operators?  WTF?!  You can do that?  I didn't even know that 
> was legal.

Legal as in C++ compilers allow. Illegal if you want code that is
maintainable others.

> >From some how to not write obfuscated code site:
> 
> "After a single nested expression however, more is probably unwise. The 
> trinary expression can save some typing, but more than one level of nesting 
> can quickly become difficult to read."

True.

> And how.
> 
> The bright side is it seems I have followed the trail of bread crumbs to the 
> bit where I make this damn stuff I've been working on all week actually do 
> something interesting!:wq

Good job!

Stephen


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to