Hacker News new | ask | show | jobs
by apinstein 4688 days ago
Prepare yourself for gross generalizations, but I have a point :)

In 1997, people moved from perl to PHP in the same way that in 2004+ people moved from PHP to Ruby.

At the time, the hard part of web programming was deployment, easy access to libraries of functions relevant for web programming, digesting forms, and emitting HTML. PHP suddenly made that trivial. PHP was basically a new language with a stdlib for web programming. It was enjoyable to work with, and it took off.

Circa 2004, the hardest part of web programming was managing the DB from the app code (migrations,ORM), quickly accessing the prolific output of the OSS community (RubyGems), and having some sane organizing principles around building apps (opinionated MVC).

In 2004 I had the same problems in my PHP apps. I had just come off of 2 years of Cocoa development and couldn't stand doing PHP the "old" way. It was too painful. I ended up porting the Cocoa framework to PHP so that I'd have a sane way of building apps. I later discovered ruby/rails, but frankly at that time it was less mature than my framework so I didn't jump.

As someone stuck in PHP land, I was frustrated by the relative lack of progress in the PHP community vs Ruby, but I was never really enamored with Ruby the language. It's powerful, and easy to read, but frankly I felt that power would eventually work against it. As the less-savvy developers moved to it, the quality of the code would greatly diminish. I feel that this has happened.

I do use a lot of Ruby projects as well, and it's rare that I don't run into critical bugs almost immediately. For as many nice things as there are about ruby, I find it very difficult to debug, and the broad application of metaprogramming, mixins, and other language tricks ends up delivering apps that have highly coupled state that fail in unpredictable, hard to debug ways. Javascript has the same problem. Frankly I don't think the ruby community is producing code of better quality than the php community at this point. There is great stuff that we can finally easily share thanks to composer.

Metaprogramming & dynamism are neat ideas but I just don't think it scales well with the constructs that those languages have. PHP 5.4 has traits which are really nice for this type of thing, and Scala's traits are even nicer. The point being that other languages can deliver that flexibility without becoming unmanageable, and I don't think there's a path to that with Ruby or Javascript.

IMO, I think languages like Ruby and Javascript will actually WANE in the far future as new languages come along with better constructs for empowering developers with dynamism that can be better managed and have faster runtime performance. I think Ruby will end up as a frowned-upon language with crap libraries and Javascript will more and more just be used as a build target.

2 comments

Quote: "I think languages like Ruby and JavaScript will actually WANE in the far future as new languages come along".

Correction: if it compiles everywhere ... it's not waning. C, C++, and JavaScript are with us for a long time. But, you're right about Ruby. :-)

> In 1997, people moved from perl to PHP in the same way that in 2004+ people moved from PHP to Ruby.

Ah yes, 2013 PHP:Ruby is the same situation as 2008 Perl:PHP.