Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62190 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35575 invoked from network); 15 Aug 2012 11:48:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2012 11:48:54 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.49 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.216.49 mail-qa0-f49.google.com Received: from [209.85.216.49] ([209.85.216.49:64184] helo=mail-qa0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/38-30529-6AC8B205 for ; Wed, 15 Aug 2012 07:48:54 -0400 Received: by qafk1 with SMTP id k1so1303975qaf.8 for ; Wed, 15 Aug 2012 04:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=a2YEkzmTBGOO8bGjAcm5Ne73bKv5XG04nof3Sjbr1E8=; b=wccGrMSOVWbA+yA9Eoel95roatj0Re+KBmXyWpiEG5jBqTFcuLNSLRlkflio0ch5MI hEqY76hqo2Vv216tgGjxWizfu2AyZEHxdReLTcMzp6gIzXCKFuMLptPpq8953FeXQLxq lnXjl8clbxibxrmvZEzc6V+II61t5mWBQKdm0XEIltmjsJJ53/ccqpTcpn2kkZ/EGQPe pwFMB9W8JSA+Bh+FLJk3R1sD9xvY6J6ScG6DeAt792Mhp7oRMiawK3GE05QbaRPGbJcv Z2L8D/ehiBoqCsDTqO7oimNsbvLQB6c7O1J/FJiwrGc2TSca8A65V+avF8kmvzw80osX B8iQ== MIME-Version: 1.0 Received: by 10.229.137.3 with SMTP id u3mr11044644qct.41.1345031331936; Wed, 15 Aug 2012 04:48:51 -0700 (PDT) Received: by 10.229.54.213 with HTTP; Wed, 15 Aug 2012 04:48:51 -0700 (PDT) In-Reply-To: References: <502A86AA.2030203@sugarcrm.com> Date: Wed, 15 Aug 2012 07:48:51 -0400 Message-ID: To: Stan Vass Cc: Stas Malyshev , Levi Morrison , internals@lists.php.net Content-Type: multipart/alternative; boundary=002354790ebcc07dcd04c74c8215 Subject: Re: [PHP-DEV] Inline typecasting / typehinting for classes and interfaces From: ircmaxell@gmail.com (Anthony Ferrara) --002354790ebcc07dcd04c74c8215 Content-Type: text/plain; charset=ISO-8859-1 Stan, On Wed, Aug 15, 2012 at 3:57 AM, Stan Vass wrote: > Hi! >> >> I agree with you. The one case where this syntax may be very useful is if >>> we want to implement class casting. So introduce a pair of magic methods >>> >> >> I do not think we want to implement class casting. I'm not sure how >> class casting even makes sense - if the object is of one class, how can >> you just make it into another class by casting? If you mean "casting" >> actually returns another object of different class, then just make a >> method for that that returns that object, I do not see how obscuring the >> purpose of this operation with unobvious syntax would help. >> > > The discussion is starting to drift very far from my original proposal. > > Instead of trying to guess what I mean, can't people just refer to my very > simple definitive proposed behavior? > My point was that what I posted was the only way that I can see for the original proposal to be useful. Anthony --002354790ebcc07dcd04c74c8215--