4 ms·
I used to use Perl. I got lots done in Perl from around 1998-2003, but I never really felt like I was having fun or really understood the language very well.
by damon_c 12y ago
I used to use Perl. I got lots done in Perl from around 1998-2003, but I never really felt like I was having fun or really understood the language very well. I just figured out what I needed to.
Then I happened upon some Python code I needed to fix. Within a week or less I already felt like I "knew" Python better than I would ever know Perl. It was fun and inspiring and felt so elegant and powerful! I never typed another line of Perl.
- dorfsmay 12y agoSame story here. I can read any piece of python without looking online or in a book, whereas I always had to look up if a particular notation was dereferencing a pointer to an array or an array of pointers in perl.
- grondilu 12y ago> I always had to look up if a particular notation was dereferencing a pointer to an array or an array of pointers in perl. You should rephrase this because you can't de-reference an array. Plus a reference to an array is always a scalar so it always has the '$' sigil, thus it's not clear what you're talking about.
- kstrauser 12y agoThat is precisely the kind of minutia that made me abandon Perl the week I discovered Python. I think I'm a reasonably intelligent person, and Perl's cleverness was a source of fun for the first year or two. I eventually got tired of feeling like I had to prove my subject mastery every time I opened an editor.
- grondilu 12y agoFrankly, I've never understood people complaining about Perl's references. Me, when I first learnt about it, I felt in familiar territory, for it reminded me of C pointers. Hell, even the '->' notation was easy to remember since it's the same as in C. And as mentioned above, the sigil system of Perl makes it impossible to confuse a reference with the object it refers to (PS. except maybe for references to scalars, but those are arguably very rare).
- alayne 12y agoFor starters, Perl has five different kinds of references with different qualifying characters for each one. $scalarref = \$foo; $arrayref = \@ARGV; $hashref = \%ENV; $coderef = \&handler; $globref = \*foo;
- grondilu 12y agoPardon me but I see only one kind of reference here. The five references above differ only with the kind of object they refer to. The "qualifying characters" you're talking about do not qualify the reference, but the referenced object.
- byEngineer 12y agoCouldn't make it more complicated, huh?
- deleted 12y ago[deleted]
- grondilu 12y agoNo, this is not complicated. I have hard times believing people on HN are that dumb, so stop pretending.
- byEngineer 12y agoNo. I get it. I do understand. Maybe I should have said needlessly complex. Ie you can have keyless entry to a car and start the engine with a press of a button. Or -- instead -- you can search for a key in your pockets (put the bag in your hand on the ground first) insert it into the lock, turn the key and then pick up the bag, take the key and put it into the ignition, turn it and start the car. So you tell me the first solution is dumb and the other one is smart? I would say that exactly opposite is true.
- kstrauser 12y ago<aol>me too</aol> Python looked like a weird toy language to me because it had such little syntax compared to Perl. Until I actually had to write some, that is, and I realized how much of Perl's syntax was superfluous and bug-inducing. For example, Perl kept C's distinction between values and references, so I always had to plan ahead about which one a function would accept and return. It was eye opening to realize there were comparable languages that allow me to not care about such things.