Why Did I Choose Perl When Building Crowdtilt
At Crowdtilt most of our system has been built using Perl. When I get asked about our technolog stack and mention Perl, I often get surprised looks followed by “Oh! wow, why?” :). In this post, I will outline some of the most important reasons we chose to go with Perl, and hopefully clarify some of the misconceptions surrounding Perl and the Perl community.
While it is enough that I have a blast using Perl and love the people in the Perl community, here is my attempt to explain a few of the reasons why my team and I decided to use Perl to build Crowdtilt:
We needed to move fast.
Crowdtilt is a young startup that is very passionate about enabling users to leverage the power of collaborative consumption models. We needed to move really fast and provide a highly scalable, extensible, and maintainable product to our customers to enable them to pool money together. Using Perl Dancer and CPAN, we were able to prototype our site in a couple of days. That same “protoype” has evolved to the current version of the website over just a few weeks.
We needed a strong community.
Perl has a very strong community with highly competent hackers. When you look at CPAN, you’ll notice that a lot of modules start their descriptions with “A simple way to do bla”, which shows how much the community cares about simplicity and implementing things in a way that makes sense. This resonates very well with our culture and philosophy at Crowdtilt. We love the Perl community, we love simplicity and elegance, and the two go hand-in-hand :).
Comprehensive Perl Archive Network.
CPAN, Perl’s module repository, is one of, if not, the largest open source module respository amongst programming languages. The repository is evolving constantly and at a blistering pace. Perl is powerful, but CPAN is a game changer. Our team is gladly contributing new modules and enhancements to existing modules, while benefiting from community feedback and support.
Perl was designed to evolve the same way a spoken language does. Humans come up with new slang words and meanings that evolve the language. Perl evolves in a very similar manner that makes the language always fresh, fun to use, as well as incredibly flexible and able to be re-tooled for any purpose.
As far as I know, Perl is one of the only languages that can evolve via 3rd party modules. Examples are Moose, MooseX::Declare and perl5i. This allows it to evolve much faster than languages such as Java and Python (both of which are also great languages) which, in order to add new language features, require changes to the core language.
Do What I Mean.
A lot of Perl modules follow a DWIM (Do What I Mean) philosophy. Lets say I want to handle an HTTP request and grab the userid parameter. Was the parameter a query param, a HTTP POST param, a key/value pair inside the json body of the request, or a token in the url? It doesn’t matter. The Dancer framework lets me simply grab it via param ‘userid’. It just does what I mean. This might make some people feel uncomfortable, and for those people there is a way to be more explicit. In practice however, the DWIM way results in more elegant and succinct code which is what we thrive on at Crowdtilt.
Perl code is fun to write.
For me, it is because of how simple Perl code can be.
We are always looking for ways to improve. So, I would love to get your feedback. In future posts, I’ll describe the rest of our technology stack and architecture in more detail.
EDIT: discussion is on Hacker News