[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ternary operator patch
- From: Drake Wilson <drake@...>
- Date: Sat, 18 Sep 2010 13:17:03 -0700
Quoth steve donovan <steve.j.donovan@gmail.com>, on 2010-09-17 08:05:54 +0200:
> Writeability is less important that _readability_, and any half-decent
> editor can do much of the actual typing involved.
Let me be slightly advocatus diaboli here despite my having a use for
conditional-expression syntax (so, this is deliberately exaggerated).
Some counterpoint(s) to that would involve readability heavily as
well, and to some extent rewritability/maintainability. One weaker
issue is that if you use a function sometimes and statement-if other
times, a reader has to understand both of those, and a maintainer has
to not slip on distinguishing the slightly different semantics.
The other point is mainly the one I mentioned earlier regarding extra
temporaries in the statement-if translation. The data flow is less
obvious because the scope of a new local will extend to the end of the
block; direct spatial association is stronger than association by
name. The temporary may not have a good name, either, and errors in
renaming can be tricky to catch because it's been propagated manually
to four different places (declaration, if-branch, else-branch, use);
similarly, a reader has to compare all four names to ensure that they
actually form the relevant pattern, since statement-if is used for so
many other things as well.
> steve d.
---> Drake Wilson
- References:
- Re: Ternary operator patch, Jeff Pohlmeyer
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, Michal Kolodziejczyk
- Re: Ternary operator patch, Michal Kottman
- Re: Ternary operator patch, Eric Man
- Re: Ternary operator patch, Tomas Guisasola Gorham
- Re: Ternary operator patch, Eric Man
- Re: Ternary operator patch, Tomas Guisasola Gorham
- Re: Ternary operator patch, David Kastrup
- Re: Ternary operator patch, steve donovan