cc'ing the internals
__

Am 07.03.2013 um 20:57 schrieb "Stas Malyshev" <smalys...@sugarcrm.com>:

> Hi!
> 
>> The main practical value is in the __unset magic method. You can now
>> communicate through the "proper" way of a language construct with an
>> __unset method. (success or failure)
> 
> I'm not sure how useful is that based on your example - unset could
> throw the exception as well... And the whole case seems still unclear -
> what is "false" supposed to mean in general case? Property didn't exist?
> Property can not be unset due to special semantics?
> -- 
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227

Take for example the unset method of a framework. Which return false. Then you 
have an abstraction layer which converts the false into an exception. Yes, in 
this simple use case it may be better to throw the exception directly. But as 
you begin to introduce these well-known design patterns there may appear some 
sense...

Unset returns false if there was nothing to unset or if an 
unset_dimension/property handler has returned false. Short: It doesn't return 
true if nothing was successfully unset.

Bob Weinand
                                          

Reply via email to