http://qs1969.pair.com?node_id=238158


in reply to Why I learn a language.

Well, about halfway through my second year at uni, one of my profs mentioned that the software engineering assignment (a CGI backend) we'd just solved in no fewer than six hundred lines of C could be done in twenty lines of Perl, and that Perl was an excellent language for text processing. That little grain of opinion stayed in the back of my mind for a year and a half, when I had to magic up some content for a machine learning project. Two hours and a hundred lines or so of baby Perl later, three formats became one, and gnuplot was making lots of pretty graphs for my paper.

If that was all Perl was good for, I'd probably be hanging out at schemers.org right now. But over the last couple of years I've discovered the wonderful, "theoretical" side of Perl that really appeals to me as a computing scientist, not just as a programmer: starting with stuff like map and closures, moving through regex extensions that turn a text-matching tool into a general backtracking system, and going on to stuff like continuations, currying, and the like.

It Depends(tm).

If I'm writing up a stats lab, which I mostly just want to get over with, I'll "optimise for programmer efficiency" -- the TA isn't even going to read my code, and I'll never have to touch it again, so I'm not going to be too concerned about keeping a clean namespace and making proper use of continuations. (Some habits are ingrained, though, and I find that even my hackish, off-the-cuff code tends to be fairly well decoupled.)

If I'm writing code to explore a problem rather than Get Something Done Right Away So I Can Go Play Guitar, I'll spend much more time on it.

--
F o x t r o t U n i f o r m
Found a typo in this node? /msg me
The hell with paco, vote for Erudil!