sohguanh
07-15-2010, 09:45 PM
I hope the topic will 'lure' covert Python developers out :D
Recently I start to dabble more into Python no thanks to Google App Engine that advocate Python over other scripting languages. Below are my comments.
1. Python removal of braces and use whitespace indentation for block expression is plain trouble-some!
2. Python provide a "true" OO syntax compared to Perl
3. A quick check via Internet still claim Perl file processing and pattern matching performance is lot's faster compared to Python
4. For big projects, Perl "multiple ways to do the same thing" start to fail on maintenance aspects. I cannot image the next person maintaining a huge project written all in Perl (mixture of procedural, OO code in a melting pot) to even understand or do it well. OO in Perl seem very "un-OO" like. It is like forcing OO features onto a scripting language which has originated as a procedural.
5. For small projects, Perl will do best and run much faster too
Edit:
6. Perl uses $ @ % to distinguish scalar, array, hash for easier reading but Python like PHP does not offer such feature. This make it hard to read the code without deciphering the variable is which type
e.g
Python code
tel = "test123"
print tel[0] gives t
tel = ["test", 123]
print tel[0] gives test
tel = {"test" :123}
print tel['test'] gives 123
Without any visual indicator, we must read other lines of Python code how the variable is used to understand if it is scalar, array or hash.
Perl code
$tel = "test123"; indicates scalar variable
@tel = ("test", 123); indicates array variable
%tel = ("test" => 123); indicates hash variable
In contrast, by looking above $ @ % is enough to let me know the variable data type
Any Perl or Python developers want to comment ? :)
Recently I start to dabble more into Python no thanks to Google App Engine that advocate Python over other scripting languages. Below are my comments.
1. Python removal of braces and use whitespace indentation for block expression is plain trouble-some!
2. Python provide a "true" OO syntax compared to Perl
3. A quick check via Internet still claim Perl file processing and pattern matching performance is lot's faster compared to Python
4. For big projects, Perl "multiple ways to do the same thing" start to fail on maintenance aspects. I cannot image the next person maintaining a huge project written all in Perl (mixture of procedural, OO code in a melting pot) to even understand or do it well. OO in Perl seem very "un-OO" like. It is like forcing OO features onto a scripting language which has originated as a procedural.
5. For small projects, Perl will do best and run much faster too
Edit:
6. Perl uses $ @ % to distinguish scalar, array, hash for easier reading but Python like PHP does not offer such feature. This make it hard to read the code without deciphering the variable is which type
e.g
Python code
tel = "test123"
print tel[0] gives t
tel = ["test", 123]
print tel[0] gives test
tel = {"test" :123}
print tel['test'] gives 123
Without any visual indicator, we must read other lines of Python code how the variable is used to understand if it is scalar, array or hash.
Perl code
$tel = "test123"; indicates scalar variable
@tel = ("test", 123); indicates array variable
%tel = ("test" => 123); indicates hash variable
In contrast, by looking above $ @ % is enough to let me know the variable data type
Any Perl or Python developers want to comment ? :)