| Can we compare PHP and node.js without it appearing as bashing ? Im critical of PHP, my impression is it has no advantages apart from being more established. I've written code in both, to do similar tasks so feel I can compare them fairly. My impression is PHP is more messy, with no real advantages to balance out what I would call 'legacy syntax cruft'. I really see node.js as a natural evolution from PHP. To be fair, its well known that Javascript has some bad parts, some of its own legacy syntax crud, but you can write in a modern style that avoids most of that - so I think its an order of magnitude less cruft in practice than PHP, and small code size reflects this assertion. I know modern PHP in OO style can be more readable, more amenable to programming in the large than old-skool top-to-bottom PHP... but I think the lispy functional features of Javascript lead to more readable 'code as thought' : map/reduce, passing functions in variables in practice is more useful to me than OO is, it leads to simpler code. A lot of people feel emotional attachment to PHP, if you love it use it. But all the things I do love about PHP, I love more about the node.js/javascript combination. You might like it too. |