by lmm · 12y ago · 0 comments
Right now I'm a huge Scala fan. I've had that experience of feeling that I never want to program in any other language again (and every other language I've gone to, even those I used to like, feels clumsy and tedious by comparison). But I hope that in 25 years' time I'll have moved on to something even better. Language design isn't done, and languages are getting better all the time.
I also miss a web framework like Django or Rails in Perl. I never liked Catalyst, but have not spent much time with it.
I cannot judge if the tooling is less obvious, but think the tools are better, especially in regard to testing. There is a virtualenv equivalent called local::lib, but I recommend the bundler equivalent called carton ;-)
I think Perlbrew [1] is closest to virtualenv.
[0] But there is Mojolicious, Dancer, Catalyst, etc [1] http://perlbrew.pl/
You haven't found any of the major Perl web frameworks? You haven't seen Moose for OO? perlbrew? (Don't get me started on list comprehension, extra stuff to learn because Python lack real maps with real lambdas.) And so on...
Do you always have opinions on stuff you have no clue about?!
Start with getting the Modern Perl book and read it (free pdf). Ask (/search) on Perlmonks.
Sure. When I just want "run this task in the background, I don't particularly care about throughput but don't block entirely". There's a niche where a proper task queue is too heavy and shared variables are a perfectly adequate communication mechanism.
> Don't get me started on list comprehension, extra stuff to learn because Python lack real maps with real lambdas.
They're a nicer abstraction for many purposes. Look at their Haskell origin, or Scala for/yield.
The Python 'process' and 'queue' modules rock (yes, multiple single threaded processes still counts as multithreading). I've had apps on the front page of HN / Smashing Mag using them, happily taking advantage of a multicore server.
I swear half the people who bitch about the GIL have never used either of these modules (not you, people in general).
That is actually what Perl is doing. With its loose original design it can evolve amazingly, and in ways that couldn't be foreseen.
It's a language for people who are comfortable enough around theory that they don't need syntax to force them to use it.
At the same time, it's highly evolutionary -- it supports the fastest, dirtiest, hackinest method of getting to the goal -- and thus has prototyping built in to production.
I often write Perl scripts twice. The first is a tape-up job to "git 'er done" and the second is a more elegant and architected approached.
This method matches the configuration of most jobs. The client doesn't (fully) know what they want. Last-minute, world-bending exceptions arise. Well-intentioned schemes gang aft agley.
With this prototyping-production, I'm able to get something up and working, and can fix it later if the client has foresight.
Theory is great. I am the first to defend theory. But if it doesn't correspond to application, there's another word for it: arbitrary.
(You may note the difference between two predominant value systems illustrated in that sentence.)
I was used to take a problem of a certain size, sit down and think for a while. Then code C for maybe 3 to 10 days.
When I did a similar problem in Perl, the time to think for a problem of that size was longer than the time to throw a solution at the wall! You could design using code, then refactor/rewrite if it got too bad.
Best of all: So much more fun.