On Mon, Apr 10, 2006 at 12:29:55PM -0700, Bryan R Harris wrote: > > > On 4/10/06, Bryan R Harris <[EMAIL PROTECTED]> wrote: > > > > Unless you're writing Perl poetry, playing Perl golf, or paying extra > > for each byte of source code, I recommend that you write code in the > > most straghtforward style possible. It may sometimes seem to be a few > > more keystrokes at the start, but you'll spend far less time reading, > > writing, debugging, and maintaining your code in the long run. > > But I love perl golf!
So do I. On the other hand, I've discovered that making source code more readable has a lot in common with golf a lot of the time. If you can do it more tersely without giving up explicitness where it's needed, you tend to end up with more maintainable code. After all, all else being equal, six lines of code is a lot more readable than fifty. When the terseness is measured in distinct syntactic elements rather than keystrokes, I think the term "succinct" becomes more appropriate than "terse" -- and that's generally a good thing. This would have been a good time for my random signature generator to provide a Paul Graham quote rather than this tired old unix virus joke. C'est la vie. -- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ] unix virus: If you're using a unixlike OS, please forward this to 20 others and erase your system partition. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>