[Kc] proposal: functional C<if>

David Nicol davidnicol at gmail.com
Thu Apr 26 00:40:49 PDT 2012


On Wed, Apr 25, 2012 at 6:50 PM, Don Ellis <don.ellis at gmail.com> wrote:

> Any thoughts on using whitespace to pretty it up a little? Might not
> work so well on -e command line (or it might with the right
> treatment), but looks fine in a script. I used this indentation in C
> to make some sprintf conditionals more readable.
>
> my $foo = $foo->bar
>        ? $bar
>        : $baz;
>
> --Don Ellis

Me too, but often with the hook and double-dot at the end of the line rather
than the beginning. I doubt that expanded ternary style debates have ever
achieved the heat level of the ones over "else cuddling."


-- 
In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" are to be interpreted using situational ethics.


More information about the kc mailing list