Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The thing I hate most is all the special global variables you can set that effect the behavior of various functions.


These are indeed bad, and nobody uses these features anymore. (They are important to have around for library authors, but you will probably never need them in "user code".)

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 => '';


This is why I stopped using Perl. I think this

  entire_file = open('file').read()
is how it should look like. You can comprehend it without knowing the language.


The only reason why you find the Perl hard to read is because you don't know Perl. I find Spanish hard to read. Why? Because I don't know the language. That doesn't mean that there's anything wrong with Spanish as a language, though, it just means I don't know it.


Two points:

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.


Don't give up on languages because of cosmetics... find a better reason!

Think this is probably easiest to understand....

  my $entire_file = slurp 'file';


"and nobody uses these features anymore"

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: