I get a kick out of all the people who gripe about Python's "context sensitive whitespace" rigid structure. Have they never edited a .conf file which depends on line-by-line organization? Have they never seen a Makefile? Shell script? How about Prolog? FORTRAN? COBOL?

FORTRAN and COBOL are line-oriented languages because data used to be stored on punchcards. One punchcard is one line of text. FORTRAN reserves the first 6 columns of each line (card) for continuation markers, comment markers, and line labels. Everything has to be indented to the 7th column, unless you're using a modern loose derivative of FORTRAN. COBOL took that even one step farther, demanding certain indentation levels for nested conditions, and on some statements, a redundant NUMBERING which indicated how much indentation the line had.

It's not better or worse, it's just different. After so many token-stream languages like C, C++, PostScript, Java, Perl, SGML, you might get to think that that's the only normal way to code. No, it's just the current "in" thing to do with the current "in" parser tools. There are many other languages and file formats where the most natural way to read is line by line.

[ e d @ h a l l e y . c c ]

In reply to Re: Perl fan being tempted with Python by halley
in thread Perl fan being tempted with Python by jeyroz

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":