Re: Inline typecasting / typehinting for classes and interfaces

From: Date: Wed, 15 Aug 2012 08:23:27 +0000
Subject: Re: Inline typecasting / typehinting for classes and interfaces
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-62168@lists.php.net to get a copy of this message
Hi! > And assignment is a kinda common operation. So I hope you can see what's > wrong with it now. No I do not. Not every imaginable use case should have dedicated language construct for it - sometimes it is OK to type 2 lines of code. Sometimes even 3. This case is well served by existing language syntax, which also allows much more flexibility and control over what happens if the variable does not match. I see no reason to invent language construct the only purpose of which is to save you typing one if clause. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#62168) next »