News for hackers. Stuff that matters.
Re:The same app 4 times: PHP vs Python vs Ruby vs Clojure by meric on Monday March 25, 2013 @07:47PM (#5440453)
It surprised me to see Clojure had the longest example and PHP had the shortest.
Re:The same app 4 times: PHP vs Python vs Ruby vs Clojure by duaneb on Monday March 25, 2013 @08:13PM (#5440562)
I wasn't surprised to see PHP do well as having the shortest path to a responsive site (in the most minimal sense) is PHP's greatest feature.
Re:The same app 4 times: PHP vs Python vs Ruby vs Clojure by adambard on Monday March 25, 2013 @07:51PM (#5440471)
I was working forwards from the Ruby example for all of these, so I may have implemented the Clojure one in a weird way.

PHP cheats a bit to be the shortest, since it just looks up files to execute and renders stdout as the result, removing the need for routing.

Re:The same app 4 times: PHP vs Python vs Ruby vs Clojure by antihero on Monday March 25, 2013 @08:00PM (#5440511)
Well, that's one of the few "advantages" of PHP.

Though PHP allows this to happen easily, it's a fairly terrible idea for production code - the shortest isn't always the best.

In reality you'd use a macroframework like Symfony or a micro like Ham https://github.com/radiosilence/Ham

Re:The same app 4 times: PHP vs Python vs Ruby vs Clojure by cpress on Monday March 25, 2013 @08:32PM (#5440643)
There is a microwork made from Symfony components called Silex: http://silex.sensiolabs.org.

Edit: I mis-read; reworded for clarity.