[Purdue-pm] False Hubris code example

Joe Kline gizmo at purdue.edu
Tue Aug 11 08:27:00 PDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Gribskov wrote:
> Why do people consider code like this to be "good"??
> 
> my $text = do { local( @ARGV, $/ ) = $file ; <> };
> 
> while it is compact, it is to my mind obscure and uneccessarily
> difficult to understand, succeeding by side effects of the overt code. 
> A whole program written like this is a nightmare. IMO of course
> 

Do you consider the rest of chromatic's program "bad" then?

I would probably just use File::Slurp unless some constraint wouldn't
let me. The one line is very idiomatic perl. Just some very deep
understanding of what perl can do.

joe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFKgY3Eb0mzA2gRTpkRAni8AKCh/zbPI84hZVAQlJi3ZM4h/GtYOwCgjIY5
BrIWGKDQcpZkB+uXSkXtpOA=
=VL6K
-----END PGP SIGNATURE-----


More information about the Purdue-pm mailing list