<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Professional PHP &#187; perl</title>
	<atom:link href="http://www.procata.com/blog/archives/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.procata.com/blog</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<lastBuildDate>Fri, 10 Dec 2010 17:23:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Keywords and Language Simplicity</title>
		<link>http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/</link>
		<comments>http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 18:38:26 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[language-comparison]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming-language]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/</guid>
		<description><![CDATA[Well, I like programming language comparisons, so how could I resist this chart (via) promoting the simplicity of the io language by pointing out how few keywords it has.  The interesting thing about this is that Java and PHP are tied on this measure of simplicity with 53 keywords.  Perhaps that reflects Java&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I like programming language comparisons, so how could I resist <a href="http://iolanguage.com/about/simplicity/">this chart</a> (<a href="http://programming.reddit.com/info/2z11k/comments">via</a>) promoting the simplicity of the io language by pointing out how few keywords it has.  The interesting thing about this is that Java and PHP are tied on this measure of simplicity with 53 keywords.  Perhaps that reflects Java&#8217;s heritage as a simplification of C++ (63 keywords) and PHP&#8217;s heritage as an amplification of C (37 keywords) toward a specific purpose?  As usual, Perl is the poster child for language complexity.  Ruby does well with 40 keywords. But, before the Ruby fans get too uppity about the simplicity of their language, they should contemplate the <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#18">cat walked across the keyboard while I was holding down the shift key</a> predefined variables that they inherited from Perl.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Comparing PHP with other languages</title>
		<link>http://www.procata.com/blog/archives/2006/02/09/comparing-php-with-other-languages/</link>
		<comments>http://www.procata.com/blog/archives/2006/02/09/comparing-php-with-other-languages/#comments</comments>
		<pubDate>Fri, 10 Feb 2006 02:51:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[dynamic-typing]]></category>
		<category><![CDATA[garbage-collection]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[language-comparison]]></category>
		<category><![CDATA[memory-management]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming-language]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>
		<category><![CDATA[static-typing]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=174</guid>
		<description><![CDATA[Chris Shiflett posted some thoughts on PHP and Ruby on Rails which has generated some interesting discussion.  Chris divides programming languages into two categories:

Flexible and powerful: PHP, C, C++, and Perl.
Structured and organized: Java, Ruby, and ASP.NET.

I don&#8217;t disagree with the cultural grouping.  PHP&#8217;s cultural heritage is definitely in the Unix programming, C/Perl [...]]]></description>
			<content:encoded><![CDATA[<p>Chris Shiflett posted some thoughts on <a href="http://shiflett.org/archive/190">PHP and Ruby on Rails</a> which has generated some interesting discussion.  Chris divides programming languages into two categories:</p>
<ul>
<li>Flexible and powerful: PHP, C, C++, and Perl.</li>
<li>Structured and organized: Java, Ruby, and ASP.NET.</li>
</ul>
<p>I don&#8217;t disagree with the cultural grouping.  PHP&#8217;s cultural heritage is definitely in the Unix programming, C/Perl camp as I suggested in <a href="http://www.procata.com/blog/archives/2006/01/13/building-a-culture-of-objects-in-php/">building a culture of objects in PHP</a> and <a href="http://www.procata.com/blog/archives/2005/09/29/why-isnt-php-the-natural-successor-to-java/">Why isn&#8217;t PHP the natural successor to Java?</a></p>
<p>I prefer to group languages in  a different way.</p>
<h4>Garbage Collection</h4>
<p>To me, this is the single biggest language comparison issue.  Managing memory is orthogonal to the task most programmers are trying to accomplish.  Thats a fancy way of saying a waste of time.  Additionally, memory management is easy to screw up.  Any process that relies on humans repeatedly doing something correctly is destined for disappointment.  Sure, there are tools that help avoid memory management bugs.  The best of these is to take it off the programmers plate entirely with garbage collection and let the programmer concentrate on other things.</p>
<p>Sure, there can be resource usage and performance issues.  However, for most cases computer hardware is cheaper than computer programmers.</p>
<p>We can divide our languages along this axis:</p>
<ul>
<li>Quickly runs: PHP, Java, Ruby, C#, Perl, Python, Smalltalk</li>
<li>Runs quickly: C, C++, Objective C, Delphi</li>
</ul>
<p>Interestingly, this corresponds fairly closely with native executable versus virtual machine.</p>
<h4>Static or Dynamic Typing</h4>
<p>The next most important axis of comparison is dynamic or static typing.  In static typing type information is associated with the variable.  In dynamic typing type information is associated with the value in the variable.</p>
<p>The benefit of dynamic typing is that you do not waste programmer time and attention with typecasting (&#8221;static types get in my way&#8221;).  The benefit of static typing is that the compiler can catch certain errors (&#8221;The compiler finds my mistakes&#8221;).</p>
<ul>
<li>Risk tolerant: PHP, Ruby, Python, Smalltalk, Perl</li>
<li>Risk averse: Java, C#</li>
</ul>
<h4>Interactive or Batch</h4>
<p>Some might call this axis interpreted versus compiled.  The issue is how long does it take to switch contexts from coding to running?  Is there a lengthy build process or a deployment stage?  The shorter the build process, the more productive development can be.</p>
<ul>
<li>Interactive: PHP, Ruby</li>
<li>Batch: Java</li>
</ul>
<p>A good example of this in the PHP world is to look at Smarty and Propel.  They both generate code to execute.  Smarty does it interactively, while Propel requires a build process.  The build process is the primary reason I don&#8217;t use Propel.</p>
<h4>Scope</h4>
<p>One should not underestimate the importance of this factor.  Why is Java considered so complicated?  One reason is that it is designed to run on everything from servers to cell phones, from desktops to dishwashers.  It&#8217;s scope is impossibly general.  Of course, specialized tools such as Rails and PHP are more productive for their sweet spot applications.</p>
<ul>
<li>General: Java, .NET</li>
<li>Specific: PHP, Rails</li>
</ul>
<h4>PHP and Ruby on Rails are two peas in a pod</h4>
<p>Looking at these factors so far, PHP and Ruby on Rails are two peas in a pod. Lets start looking at some of the factors where Ruby and PHP begin to diverge.</p>
<h4>Popularity</h4>
<p>Popularity brings better tools, more available developers, better documentation, and better productivity.  Programming on a discontinued or rarely used platform is more difficult.</p>
<ul>
<li>Popular: PHP, .NET, Java</li>
<li>Rare: Python, Ruby, Smalltalk</li>
</ul>
<h4>Abstraction</h4>
<p>Working at a higher level of abstraction allows the programmer to be more productive.  The computer industry has continuously been heading up the abstraction scale without looking back.  Professional programmers want to work with higher level constructs because they are more expressive.  One can get more done with less code.  The draw back is that higher level language features can require more programmer skill to use well.  </p>
<ul>
<li>Simple: PHP, C, Java</li>
<li>Powerful: Ruby, Smalltalk, Lisp</li>
</ul>
<p>I&#8217;m talking about the language, not the libraries when I classify Java as simple.  Dynamic versus static typing aside, I see the Java and PHP languages as similarly expressive.</p>
<p>I have alot of respect for <a href="http://en.wikipedia.org/wiki/Anders_Hejlsberg">Anders Hejlsberg</a> and there is some serious innovation going on in the C# world on this front.  Java can barely keep up.</p>
<p>The Rails folks are fond of saying that Rails couldn&#8217;t be written without the expressive features of the Ruby language.  It would be interesting to get the opinions of some of the cake developers on this idea.</p>
<h4>Library Organization</h4>
<p>Not my favorite part of PHP.</p>
<ul>
<li>Function oriented: C, PHP</li>
<li>Object oriented: Java, .Net, Python, Ruby</li>
</ul>
<h4>Stiffies?</h4>
<p>I think Ruby is misclassified when placed with Java and C#.  Ruby is closer to PHP than it is to either Java or C#.  Rails and PHP share most of the same sources of productivity: garbage collection, dynamic typing, interactivity, and focus on web applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2006/02/09/comparing-php-with-other-languages/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
	</channel>
</rss>

