lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Quoth steve donovan <>, 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