Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> * The nature of the early adopter individuals and companies (thought experiment: young Mark Zuckerberg sits down one night and proceeds to write thefacebook v0.0.0.0.1 in Perl, not PHP)

A couple of points:

01) PHP was already very well established when Zuckerberg wrote thefacebook. As was Perl, Python, ASP.NET, Cold Fusion, and a few Java solutions (such as Tomcat) too. While it feels like Facebook has been around since forever, it's actually quite a recent development relative to the age of the web. My point being that it wasn't Facebook that made PHP big.

10) You theorise about what might have happened if early prototypes of thefacebook written in Perl but that was actually the original language Zuckerberg favoured (eg https://gist.github.com/philfreo/7257723).



Gosh, so weird to see that perl snippet.

I love the empty degrees of separation predicates, https://gist.github.com/philfreo/7257723#file-gistfile1-pl-L...

I can't help but to think he should have gone list monadic {and lisp too but well, enough dogma}:

http://dorophone.blogspot.com/2011/04/deep-emacs-part-1.html


1) True, I was a casual user of PHP before TheFacebook and remain so. The main point of the counterfactual is about Perl, ie that Perl probably would have retained a bigger part of the dev ecosystem. Though it's also true that a product like HHVM may never have happened.

2) Nice! #TIL


I don't think it's fair to say that Perls lack of retention for any sizable part of the modern web development ecosystem was down to it's performance. Since the days of Apache 1.x Perl has had native C bindings for httpd via mod_perl, which unsurprisingly runs circles around FastCGI and the even slower standard CGI.

It's also worth remembering that Ruby didn't really take off as a major force for web development until around a decade ago - after Facebook was created - when the Rails framework was released. The reason I bring Ruby into the discussion is because Ruby's performance is roughly on a par with Perl's while having an arguably superior web framework (Rails) to Perl's CGI or mod_perl modules.

As much as I love Perl (it's genuinely one of my favourite languages), it really can be a complete pig to work with at times due to it's tendency to encourage code golfing and the many counterintuitive language features that were presumably inspired from shell scripting / awk. This weird and often unexpected complexity is what I think drove a lot of people away. PHP on the other hand, was purposely designed to be a simple language for web development. So while PHP did take some inspiration from Perl, it was more idiomatic to C than Perl was. Which meant it was an easier language for developers to adopt (also be in mind that ASP - which was predominantly VBScript - was heavily used and PHP was easier to adopt than Perl).

At least that's how I remember things back when I used to develop in the 90s


mod_perl and CGI are no longer recommended for modern perl development. We have Mojolicious, Dancer, Catalyst, Plack, and many other modern frameworks (and libraries). Most of these will run circles around mod_perl, without giving you the horror that is mod_perl's global variables + namespacing hacks and its propensity to segfault.


I'm aware mod_perl and CGI aren't recommended for modern projects (I spent a good few years as a Perl developer too). The reason I neglected to mention Catalyst et al was because my post was a historical piece and the frameworks you've discussed didn't exist back then.

As an aside, mod_perl's tendency to segfault was easily the single most frustrating thing about Perl development. I've lost count of the number of times I've ran strace against apache processes trying to trace whatever was causing the code to crash. Ugh, glad I don't have to do that any more.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: