ANN: Dao Language v.0.9.6-beta is release!
apardon at forel.vub.ac.be
Thu Dec 8 09:23:52 CET 2005
Op 2005-12-07, Steven D'Aprano schreef <steve at REMOVETHIScyber.com.au>:
> On Wed, 07 Dec 2005 15:26:59 +0000, Zeljko Vrba wrote:
>> Braces are very convenient to match block start and end. Open a C program
>> in the VI editor, and press % in command mode on some brace.. It will take
>> you to its matching brace. How do you do something like that with python code
>> (or any code that is based purely on indentation..)
> (1) You don't need to, because you can *see* where the indentation
> changes, so you don't need to rely on your editor counting for you.
But you can't alway easily discern by how much.
> (2) And if you do need to, then you should use a smarter editor that
> understands indentation levels, not just braces.
> Braces are superfluous if you use consistent indentation, and indentation
> is superfluous -- to the compiler -- if you use braces. But indentation is
> *not* superfluous to the human eye: we can parse indentation very easily,
> but nested braces/brackets only with great difficulty. That's why
> programmers in languages that ignore indentation still indent their code,
> or at least the sensible ones do.
But sometimes you mess up and your code is no longer indented as it
should. If you marked the end of the indentations, you can easily
More information about the Python-list