Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
User Journal

Journal athloi's Journal: It's easy to write readable Perl 2

Perl developers have to try to write good, readable code. *

Although I respect this writer's opinion, I really have to disagree here.

It's easy to write readable Perl code, especially if you come from a C/C++ background, because you are thinking beyond a series of regular expressions.

The Perl code that ends up a nightmare is the result of either a programmer determined to prove he's clever, or a task conceptualized as a series of regular expression filters. Either can be made readable easily, and doing that re-shapes the way the brain makes code.

If you get into the practice of treating Perl like a programming language, and not a scripting language, it starts to make sense to use the un-shortcuts that make it easy to read.

All of the good Perl programmers I know write this way, because it means their code has a longer life when it leaves their hands. We all know that much of what we write will be maintained by others, so it's a matter of courtesy and good business to write it clean.

This discussion has been archived. No new comments can be posted.

It's easy to write readable Perl

Comments Filter:

"The one charm of marriage is that it makes a life of deception a neccessity." - Oscar Wilde

Working...