|
Posted by Andy Jeffries on 03/30/06 11:58
On Thu, 30 Mar 2006 00:53:47 -0800, Treefrog wrote:
> For a while now I've been wishing PHP had (at least the option to enable)
> strict types. It would help a massive amount in BIG applications, and
> maybe start to taper the millions of lines of crap code that's out there.
To be honest the only real problem is with objects. For large
applications a consistent naming scheme helps with simple variables and in
a lot of cases it's not really important what the variable is.
With regards to objects, PHP5 now has type hints which ensures a parameter
to a function or method is of a given type (class):
function bar(Foo $foo)
{
...
}
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Navigation:
[Reply to this message]
|