From: Robert Klemme Date: 2010-11-15T20:55:49+09:00 Subject: Re: Ruby Vs PHP On Mon, Nov 15, 2010 at 10:45 AM, James Vince wrote: > PHP has more lines of code in the actual File than ruby. If you take a > controller (in Rails) and compare it to a PHP program, PHP has more > lines of code. However Ruby has libraries to do most of this code for > you, if you include the libraries that you use Ruby has much more lines > of code. That sounds convincing on first sight yet I am missing hard facts. Can you put figures on this for a concrete application? We could start with versions of Ruby and PHP you are comparing here. > But because people who program Object Oriented Code tend to consider > library code to not part of the actual program (as it is part of the > API) they see it as "the actual code you write is less". Which is true of course. You only need to write and test your own code and can rely on the library author's QA for their code. Of course, from time to time you'll find a bug in library code as well. > Having large libraries of code (coupled with the fact that Ruby has a > slow interpreter) does make Ruby somewhat slower performance wise, > however a Ruby programer would argue that because Ruby language is more > efficient that PHP by re-using code and by using symbols where necessary > instead of strings that makes up for it's slow rendering time. Again, this sounds convincing on first sight but it actually isn't. Using a library does not automatically mean that more code is executed or an application is slower. Without hard facts all these statements stand on a very shaky ground and I would certainly not base my choice of language or framework on what you wrote. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/