by jrockway · 18y ago · 0 comments
Sometimes it's acceptable to use them in a very small scope:
my $entire_file = do { local $/; <$filehandle> };
This is much easier to read than something like: my $entire_file = readline $filehandle, -line_separator => ''; entire_file = open('file').read()
is how it should look like. You can comprehend it without knowing the language.1) He said - "you can comprehend it without knowing the language" and you responded with "well, of course you can't read it - you don't know it!". The argument is specifically about being able to read a language without knowing what % ! and $ stand for.
2) Equating a programming language to a human language as if proficiency or deficiency in the first implies something about the second is really a bad idea. Human languages evolve naturally without a designer who can make a language less or more readable. For a programming language, there is always a designer, and readability by a person "unskilled in the art" is a major category by which the language is judged.
Think this is probably easiest to understand....
my $entire_file = slurp 'file';Right. maybe you should come tell that to all of the Perl lovers I have to work with who use them semi frequently.
I used to do only C and didn't like using lesser "scripting" languages then I forced myself to learn Perl and Python in parallel. Now I actually like Python and use it a lot. Yet I still loath Perl more than I originally thought I did. People need to face the facts Perl is a disaster of a language and you don't need to know much about Perl to know that.