use Acme::Numbers; print two.hundred."n"; # prints 200 print forty.two."n"; # prints 42 print zero.point.zero.five."n"; # prints 0.05 print four.pounds.fifty.five."n"; # prints "4.55" print four.pounds.fifty.pence."n"; # prints "4.50" print four.dollars.fifty.cents."n"; # prints "4.55"
You probably wouldn't want to do this in production code, but like the best of Damian Conway's not-useful-but-thought-provoking modules, it may spark some ideas that you can apply to more useful situations. If nothing else, the source is a fine lesson in overloading and method importing.
Adam Kennedy is thinking about the future of Strawberry Perl.
In line with my attitude that the main Strawberry "product" should be conservative, reliable and predictable (I'm going with a rough analogy to Firefox product-wise) I've been thinking a little about how the release tempo should look. My current thinking for Strawberry Perl is to do quarterly releases, with a tentative schedule of releases in January/April/July/October and aiming at being available for download before the second Monday of the month.
In addition, he's asking for your ideas on features to include in the April 2008 release.
The other day I posted a link to an article by Ted Neward called "Can Dynamic Languages Scale?" I thought it was interesting to see that an outsider saw the potential in Parrot, even though it's not at 1.0 yet. As an afterthought, I lamented that he made a dig at Perl at the end, smiley face or not. I meant it to have the same sort of gravity as saying "Aw, shoot, it's raining out." I didn't care that he didn't like Perl, but that he had to take a swipe. It certainly wasn't a big deal.
Apparently his article caused a minor uproar. Neward posted a followup called "So I Don't Like Perl. Sue Me" in response to the Perl folks arguing with his taste in languages. He shouldn't have had to do that.
I don't get Radiohead. It's all ponderous and aimless. I also don't get Phish, Peter Gabriel and/or Genesis, Yo La Tengo or Tori Amos. But so what? It's personal taste. I don't like Java, either, although I haven't written any in the past 10 years. You know why I don't like Java? It just doesn't look like it's any fun. I'm sure people can explain to me why Java is great, but it won't change my mind. And it doesn't need to.
If you really want someone to love Perl, you'll have to show him, not tell him. Show him great code, great projects. Show the doubters that Perl can do amazing things. Action, not words. And if he still doesn't get it, that's OK.
Ted Neward has written an article on the problems of scaling up projects based on dynamic languages:
While a dynamic language will usually take some kind of performance and memory hit when running on top of VMs that were designed for statically-typed languages, work on the DLR and the MLVM, as well as enhancements to the underlying platform that will be more beneficial to these dynamic language scenarios, will reduce that. Parrot may change that in time, but right now it sits at a 0.5 release and doesn't seem to be making huge inroads into reaching a 1.0 release that will be attractive to anyone outside of the "bleeding-edge" crowd.
Alas, he has to end with "Perl just sucks, period." Even as we work forward with Parrot and Perl 6, the continued public perception of Perl doesn't change. :-(
autocmd FileType perl :noremap K :!perldoc <cword>
<bar><bar> perldoc -f <cword><cr>
Now hitting K in vim runs perldoc or perldoc -f on the word under the cursor.