<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 24 May 2013 14:33:16 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DZone.com: The Duck is a Lie]]></title>
      <guid>http://www.phpdeveloper.org/news/18144</guid>
      <link>http://www.phpdeveloper.org/news/18144</link>
      <description><![CDATA[<p>
In <a href="http://css.dzone.com/articles/duck-lie">this recent post</a> to DZone.com <i>Giorgio Sironi</i> looks at duck typing and compares it in a few different languages (PHP, Ruby and Java). "Duck typing" is where the methods/functions define the structure or common interface rather than being functional.
</p>
<blockquote>
What follows is my experience with Java, PHP and Ruby. I mainly use PHP as a dynamic language that supports duck typing but also the definition of Java-like interfaces, but does not force any of the two approaches as you can define interfaces whose method arguments accept any variable or not using interfaces at all. Is duck typing that a revolution?
</blockquote>
<p>
He shares some of the common misconceptions he's seen including the idea that duck typing can help completely different objects work together and that, sometimes, despite naming conventions, functionality was intended to be different. He shows how even interfaces in PHP can be implemented loosely and the "acts as" and "single callback" architecture ideas.
</p>]]></description>
      <pubDate>Wed, 27 Jun 2012 09:55:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Pim Elshoff's Blog: In favour of typing]]></title>
      <guid>http://www.phpdeveloper.org/news/17867</guid>
      <link>http://www.phpdeveloper.org/news/17867</link>
      <description><![CDATA[<p>
<i>Pim Elshoff</i> has a new post to his blog that shares his preference on <a href="http://www.pelshoff.com/2012/04/in-favour-of-typing">typing (keystrokes, not variables) in applications</a> (hint: he likes it):
</p>
<blockquote>
We sometimes conceive of ideas that are arduous to express in code. Like persisting data, or some other uncommon task (sarcasm). It's not difficult, but it takes a lot of keystrokes to write. Being problem solvers, we find it difficult doing this kind of manual labour, especially when machines can do it for us. Still, I would like to take this opportunity to say that typing rocks and solutions that save typing suck.
</blockquote>
<p>
He talks about the abstraction that frameworks provide (less typing, more work) and and some of the "magic" that comes with them. He gives specific examples of some of his pervious experience with frameworks (including some pains with Symfony2) and how some of the magic he's seen is easy to write but hard to read.
</p>]]></description>
      <pubDate>Wed, 25 Apr 2012 13:57:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Evert Pot's Blog: Numeric string comparison in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16249</guid>
      <link>http://www.phpdeveloper.org/news/16249</link>
      <description><![CDATA[<p>
In <a href="http://www.rooftopsolutions.nl/blog/numeric-string-comparison-in-php">this new post</a> to his blog <i>Evert Pot</i> reminds you (the PHP developer) about the loose and strict typing checks that you need to do when checking the values of your variables and never just assume. PHP's loose typing tendencies can cause issues if you're not paying attention.
</p>
<blockquote>
As long as you make sure you always use strict checking (=== and !==) where you can, and fall back to the loose checks when you must. As a PHP developer, I think it's very important to understand and memorize exactly how these work, whether you're writing new code, or maintaining existing code.
</blockquote>
<p>
He points out a specific example of some code that seems counter-intuitive when you compare how it reads and how it actually works (strings converted to floats and evaluated)
</p>
<blockquote>
The moral is: always do strict checks when you are able to.
</blockquote>]]></description>
      <pubDate>Tue, 26 Apr 2011 09:23:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Giorgio Sironi's Blog: Java versus PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14364</guid>
      <link>http://www.phpdeveloper.org/news/14364</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Giorgio Sironi</i> has a (more balanced) comparison of <a href="http://giorgiosironi.blogspot.com/2010/04/java-versus-php.html?">Java versus PHP</a> that them on topics like how they handle typing and their execution models.
</p>
<blockquote>
If you exclude C and its child C++, the <a href="http://langpop.com/">most popular programming languages</a> in the world are Java and PHP, which power most of the dynamic web. I have working experience with PHP and for academical purposes I am deepening my knowledge of Java, thus I'd like to point out similarities and key differences between these two languages. Every language has its pros and cons, so there's no absolute winner here.
</blockquote>
<p>
He briefly covers their history, java's static versus PHP's dynamic typing, how they both handle objects, their execution plans and how easy they are to deploy when it comes to general applications.
</p>]]></description>
      <pubDate>Fri, 16 Apr 2010 10:55:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jani Hartikainen's Blog: Static/Dynamic typing sweet spot]]></title>
      <guid>http://www.phpdeveloper.org/news/11168</guid>
      <link>http://www.phpdeveloper.org/news/11168</link>
      <description><![CDATA[<p>
In a <a href="http://codeutopia.net/blog/2008/10/08/staticdynamic-typing-sweet-spot/">new post</a> today <i>Jani Hartikainen</i> takes a look at one of the things that makes PHP both powerful and unpredictable at times - its variable typing, static versus dynamic.
</p>
<blockquote>
It seems that PHP has moved a bit towards static typing, and languages like C# seem to be implementing some dynamic features. Are we going towards a "mixed" language with static and dynamic typing? What's the "sweet spot" between completely static (like C++) and completely dynamic typing (like Python)?
</blockquote>
<p>
He compares the benefits of static and dynamic, and a particular place where PHP falls a bit flat - type hinting in certain situations. He agrees, though, that dynamic typing is "the way to go" since it gives the developer the flexibility they might need for more "typing tricks" in their apps. Oh, and "duck typing"...
</p>]]></description>
      <pubDate>Wed, 08 Oct 2008 10:24:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog: The Yin and Yang of Typing]]></title>
      <guid>http://www.phpdeveloper.org/news/9546</guid>
      <link>http://www.phpdeveloper.org/news/9546</link>
      <description><![CDATA[<p>
A little while back <i>Matthew Turland</i> <a href="http://ishouldbecoding.com/2008/01/19/the-yin-and-yang-of-typing/">posted about</a> something that some developers moving over to PHP from more strict languages have an issue with - variable typing - and how its evolved in languages over time.
</p>
<blockquote>
Without a little background in programming languages or computer science in general, it's entirely possible that <a href="http://en.wikipedia.org/wiki/Type_system">typing systems</a> are not something that have crossed your mind. I thought I'd take a blog entry to share some of my thoughts on how it's affecting the creation and evolution of languages.
</blockquote>
<p>
He walks through history a bit, mentioning C, Java, Python and PHP and how they differ in their default type handling. He especially focuses on the "blurred line" between strong and weak typing and how some if offers special features to the language that uses the method.
</p>]]></description>
      <pubDate>Fri, 01 Feb 2008 11:58:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Nick Halstead's Blog: Do faster typists make better coders?]]></title>
      <guid>http://www.phpdeveloper.org/news/8331</guid>
      <link>http://www.phpdeveloper.org/news/8331</link>
      <description><![CDATA[<p>
<i>Nick Halstead</i> <a href="http://blog.assembleron.com/2007/07/24/do-faster-typists-make-better-coders/">asks an interesting question</a> on his blog today - "Do faster typists make better coders?"
</p>
<blockquote>
<p>
I have been able to touch type since about age 12 and can manage about 100 words per minute when faced with blocks of text to copy and even faster if I am just writing code. [...] Programming in C meant a lot more typing of parenthesis and a lot more thinking about the structure of the code.
</p>
<p>
PHP has introduced another set of typing problems with a lot more use of < > and a much higher mixture of variables/functions/parenthesis plus the added bonus of trying to remember a single function from a choice of 3000+.
</p>
</blockquote>
<p>
Several of <a href="http://blog.assembleron.com/2007/07/24/do-faster-typists-make-better-coders/#comments">the comments on the post</a> suggest that it could be helpful to productivity, but shouldn't be focused on too much. After all, what really matters is the programmers skill, right?
</p>]]></description>
      <pubDate>Wed, 25 Jul 2007 14:51:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: Initializing & typing variables with settype()]]></title>
      <guid>http://www.phpdeveloper.org/news/6269</guid>
      <link>http://www.phpdeveloper.org/news/6269</link>
      <description><![CDATA[<p>
In <a href="http://doughboy.wordpress.com/2006/09/14/initializing-typing-variables-with-settype/">his latest post</a>, <i>Brian Moon</i> talks about a method to help you and your code fit into an E_STRICT style of coding - the <a href="http://www.php.net/settype">settype function</a>.
</p>
<blockquote>
These days, the way to develop is to have E_ALL and maybe even throw in E_STRICT if you are really hard core. That of course means having all your variables initialized before they are used.
</blockquote>
<p>
In <a href="http://doughboy.wordpress.com/2006/09/14/initializing-typing-variables-with-settype/">his view</a>, defining them is good, but it's more "elegant" to use the settype function to make it more clear where they are defined. He also includes a function, using settype, that ensures that the entered values are what they should be (i.e. and int is an int).
</p>]]></description>
      <pubDate>Thu, 14 Sep 2006 07:01:47 -0500</pubDate>
    </item>
  </channel>
</rss>
