Re: Property Accessors v1.2 : Typehints / Accessor Syntax

From: Date: Wed, 17 Oct 2012 11:07:58 +0000
Subject: Re: Property Accessors v1.2 : Typehints / Accessor Syntax
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-63496@lists.php.net to get a copy of this message
Hi! > I see this argument crop up with every typehint discussion and just > don't understand it at all. Why would you want to check the variable > type everywhere? You just assign it and if it doesn't work, then you > get an error. Just like it should be. I mean, do you seriously check No, you don't get an error. You'd get an error in compiled language. In dynamic language, your client gets an error when his site is launched and instead of happy launch his users get white screens. To avoid that, you'd need to add checks - or just ship it as is and hope your unit tests were as good as you hoped they are (which they never are). -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#63496) next »