[ale] perl, python, C, C++ old code readability

James P. Kinney III jkinney at localnetsolutions.com
Fri Feb 15 10:00:18 EST 2002


I would posit that one the biggest drawbacks to Perl is that it is
clearly an evolved language. Its beginnings were simple enough. But as
more ways to use it were found, it grew in complexity. It is very easy
to write unintelligible code in Perl. It is also easy to not write that
way. The moniker "Swiss army chainsaw" is not a joke! But this "there is
more than one way to do it" is a main cause for obfuscation in Perl.

Python, by virtue of being newer, has a leg up on Perl in code
readability. It was designed to force programmers to not use the old,
bad habits they liked so much in Perl. It certainly makes learning
Python much easier than learning Perl was! Of course when I had to learn
Perl, it was on a live website that was in use daily by 360 students. I
had used fortran, pascal and basic before. Perl in 4 days flat on some
on else's code is quite a "feet in the fire" learning process :)  I
don't recommend it!

On Fri, 2002-02-15 at 09:23, hirsch at zapmedia.com wrote:
> Danny Cox writes:
> 
>  > From "The Elements of Programming Style" by Kernighan and Plauger:
>  > Rule #1: Write clearly - don't be too clever.
> 
> An excellent rule, and one I have a constant urge to violate.  That is
> one of the reasons I don't like to write in perl--I think perl
> encourages clever writing.  If you know what you are doing, perl
> allows for incredibly terse code.  The are so many ways to do things
> implicitly in perl that many steps are left out of the code.  Reading
> it then takes much longer than if the steps were made explicit.
> 
> One reason I like to write in Python is that I think it encourages
> simple writing.  I think many perl programmers are annoyed by having
> to type the extra characters, but they make it much easier for another
> human to parse.  The syntactic white space of Python enforces good
> indentation habits, something that is optional in every other language
> I know.
> 
> I half agree with Jim Kinney that it is the programmer, not the
> language, that determines the readability of the code, but only half.
> If a language encourages dense and terse coding, then it is hard (not
> impossible) even for good programmers to write readable code.  If the
> language lends itself to readable code, even not so good programmers
> tend to write readable code.
> 
> --Michael
> 
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
> sent to listmaster at ale dot org.
> 
-- 
James P. Kinney III   \Changing the mobile computing world/
President and COO      \          one Linux user         /
Local Net Solutions,LLC \           at a time.          /
770-493-8244             \.___________________________./

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7 



 This is a digitally signed message part




More information about the Ale mailing list