SV: Python Productivity over C++

Michal Vitecek M.Vitecek at sh.cvut.cz
Thu Jun 15 08:55:43 EDT 2000


Eric Lee Green <eric at estinc.com> wrote:
>Michal Vitecek wrote:
>>  this is highly debatable - properly written C/C++ source is pretty well
>>  readable and self-documenting. similarly, badly written python source
>>  makes it as unreadable as in other languages - there's not a point in
>>  trying to prevent people from writing (un)readable source code.
>
>It's harder to write unreadable Python source because you can't write code
>like, hmm,
>
>opendir(FOO,\"%s\");@files=readdir(FOO);foreach (@files) { if
>(/^[^\\.].*\\.txt$/) { print \"%s/$_\\n\";};};closedir(FOO);

 you could notice i'm not advocating perl which can be most of the time
 someone's nightmare. i'm advocating C++ operators, braces and assignments
 inside if statements. you could save your time writing this perl example
 because it's irrelevant.

>since Python enforces proper indentation and limits you to one statement to
>line.
>
>Yes, you can write unreadable Python code. But you have to work at it.

 well - there are some (like me) who consider many more lines of source
 less easily understandable (i do not have 23" monitor). in the same
 manner i use &&, || to have a good view of the code ('and' 'or' inside an
 if statement can be easily overlooked).
 don't get me wrong - i like python - i just hate its enforcing me to some
 really uncommon syntax.

-- 
			fuf


------------------------------ na IRC -------------------------------------
 BillGates [bgates at www.microsoft.com] has joined #LINUX
 ...
 mode/#linux [+b BillGates!*@*] by DoDad
 BillGates was kicked off #linux by DoDad (banned: We see enough of Bill
          Gates already.)
 





More information about the Python-list mailing list