Python and Ruby
John Bokma
john at castleamber.com
Sun Jan 31 15:47:08 EST 2010
Nobody <nobody at nowhere.com> writes:
> Configurable tab stops in a text editor is one of those "features" that
> differentiates a "coder" from a software engineer. A coder implements it
> because it's easy to implement, without giving a moment's thought to the
> wider context (such as: how to communicate the non-standard tab stops to
> any other program which needs to read the file).
[..]
> if(x) {
> if(y)
> foo();
> else
> bar();
> }
>
> See the problem?
Nope, because a good editor will format this correctly. One written by
software engineers ;-)
> Given that any sane program uses indentation to reflect the program's
> structure, braces (or "begin", or "end" (or endif/endwhile/etc)) are
> redundant.
An editor can correct the indenting of the braces example but can't with
this one.
if x:
if y:
foo()
else:
bar()
While braces might be considered redundant they are not when for one
reason or another formatting is lost or done incorrectly.
FWIW: I have no problem with how Python doesn't use braces nor on how
other languages do insist on braces or other structure markers.
--
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
More information about the Python-list
mailing list