PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Kevin Schroeder's Blog: Objections to dynamic typing

Note: This article was originally published at PHPDeveloper on 9 February 2011.
PHPDeveloper

Kevin Schroeder has a new post to his blog today about dynamic typing (a big part of PHP's variable handling) and how it has nothing to do with scalability in reply to some comments about how using them can hinder the performance of an application.

Every once in a while I inject my opinions into places where they are not welcome. I have heard from people in the staticly-typed realm of how amateur dynamic typing is. Some people are interested in understanding how to use dynamic typing, others, not so much. So what I would like to do is talk about some of the arguements made against dynamic typing. Clearly PHP will be my reference point, but many of my points will be salient across many dynamically typed languages.

He dispels some of the myths surrounding PHP's dynamic typing. He points out that PHP isn't always dynamically typed, that bad things can happen with compiled code too and that bad or missing validation of data isn't a reason to jump all over variables that could shift types.