code review

Rick Johnson rantingrickjohnson at gmail.com
Mon Jul 2 20:22:35 CEST 2012


On Jul 2, 11:42 am, Chris Angelico <ros... at gmail.com> wrote:
> Rick, do you realize that you have
> to spoon-feed the interpreter with spaces/tabs when other interpreters
> just KNOW to drop back an indentation level when you close a brace?

Yes. And significant white space is my favorite attribute of Python
source code. But the difference here is like night and day. While your
getting bogged down playing "match-the-brackets", i'm writing code and
being productive. I don't need to put any mental effort into pressing
the Enter+Tab keys. On the contrary, you must constantly break your
mental focus to "corral" the braces, and the sad part is, you're still
formatting your code like mine (with tabs and newlines!) however your
simultaneously juggling superfluously archaic syntax! Why Chris? WHY?

> I simply need to make sure that the interpreter and I have the same
> understanding of the code. It will then work correctly. There's
> nothing special about one syntax or another,

I agree in the sense of: "to each his own". However. There are methods
of writing code that are more productive, and methods that are less
productive, and your emotive agenda of defending such nostalgic
pedantry is quite self-defeating.

> they're all just
> communication from my brain to a CPU, and different syntaxes are
> suited to different tasks. There's nothing inherently wrong with:
>
> right_length = len(x) > 5, < 20

Agreed. I wish we had one language. One which had syntactical
directives for scoping, blocks, assignments, etc, etc...

BLOCK_INDENT_MARKER -> \t
BLOCK_DEDENT_MARKER -> \n
STATEMENT_TERMINATOR -> \n
ASSIGNMENT_OPERATOR -> :=
CONDITIONAL_IF_SPELLING -> IF
CONDITIONAL_ELSE_SPELLING -> EL
...

> (I quite like braces, myself, [...] and only a relatively small
> amount of actual logic.

So you have a penchant for confinement and an aversion to logic? Hmm,
interesting!



More information about the Python-list mailing list