Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60588 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36895 invoked from network); 15 May 2012 01:17:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 May 2012 01:17:16 -0000 Authentication-Results: pb1.pair.com header.from=seva.lapsha@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=seva.lapsha@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: seva.lapsha@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gg0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:43197] helo=mail-gg0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/70-28418-99EA1BF4 for ; Mon, 14 May 2012 21:17:13 -0400 Received: by ggnf2 with SMTP id f2so4470959ggn.29 for ; Mon, 14 May 2012 18:17:10 -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=MPFrz+NoKAJicaLa8Q16URzAIc1bSi0GuqPiTdyegEc=; b=PVBk4mUChDBM/6M9oZ3FW6cQ+tsBb848hIYmXpZjCJbHfKl5QD2L0PGXvBuA/rP+Vm lXmlvWG24oiZXkTqc02i1UHsInTltLSNDJdcRXIHL6tzk9kuE0+wblzCN+Ah+/DUrQxf 7Ax4ss0EqOLFtthwWmKNuO2jVbHHadTA0L7dgs40/jkxswPZPPcQft4ljdL9dGyrs3aU 58RronpgBUHMcAjbn23/iObAHImhm23Tv9dT0h2BnhKM+/9S0uP8J7aZBVR+wzK8HI6m xojF4+fatRI9aW5vP6fCry6MPvSE4Kwy6RB9R8I62rtgzebl/B9MKZrLCd3W3fGyfQZr OSVA== MIME-Version: 1.0 Received: by 10.50.135.97 with SMTP id pr1mr721897igb.49.1337044630576; Mon, 14 May 2012 18:17:10 -0700 (PDT) Received: by 10.231.241.199 with HTTP; Mon, 14 May 2012 18:17:10 -0700 (PDT) In-Reply-To: <9570D903A3BECE4092E924C2985CE48555C04ACC@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE48555C0420D@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE48555C0498A@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE48555C04ACC@MBX202.domain.local> Date: Mon, 14 May 2012 21:17:10 -0400 Message-ID: To: Clint Priest Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8f923baa411e3f04c008f61e Subject: Re: [PHP-DEV] [RFC] Custom Casting From: seva.lapsha@gmail.com (Seva Lapsha) --e89a8f923baa411e3f04c008f61e Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Please read my previous comment. On Mon, May 14, 2012 at 3:31 PM, Clint Priest wrote: > How would one use your Castable interface to cast a Class =93Test=94 to = any > of integer, array or boolean?**** > > ** ** > > *From:* Seva Lapsha [mailto:seva.lapsha@gmail.com] > *Sent:* Monday, May 14, 2012 12:19 PM > > *To:* Clint Priest > *Cc:* internals@lists.php.net > *Subject:* Re: [PHP-DEV] [RFC] Custom Casting**** > > ** ** > > My pastbin is for casting anything to anything.**** > > On Mon, May 14, 2012 at 11:24 AM, Clint Priest > wrote:**** > > Both of the RFC's you reference are for casting TO a scalar, not TO an > object type. Your pastbin is for casting FROM a scalar TO an object.**** > > > -----Original Message----- > From: Seva Lapsha [mailto:seva.lapsha@gmail.com]**** > > Sent: Monday, May 14, 2012 6:18 AM > To: Clint Priest > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Custom Casting > > Sorry, I comprehend neither the cause nor the effect in your argument > statement. Can you please elaborate? > > On Sun, May 13, 2012 at 7:27 PM, Clint Priest wrote= : > > > This has already been covered quite a bit, the problem with your > > suggestion is that the compiler needs to determine the type it is cast > > to, which is why the __toInt(), __toArray(), etc, so that the language > > can request the type it needs to cast to. > > > > > -----Original Message----- > > > From: Seva Lapsha [mailto:seva.lapsha@gmail.com] > > > Sent: Wednesday, May 09, 2012 4:56 PM > > > To: internals@lists.php.net > > > Subject: [PHP-DEV] [RFC] Custom Casting > > > > > > Hello All, > > > > > > Please be kind to review and comment my proposal for custom casting > > > in > > PHP (or let me know if a similar proposal was already > > > discussed). > > > > > > http://pastebin.com/sPb0i8U6 > > > > > > IMHO, it's more simple and on the other hand more flexible than > > > proposed > > in: > > > > > > https://wiki.php.net/rfc/object_cast_to_types > > > https://wiki.php.net/rfc/class_casting_to_scalar > > > > > > Thank you in advance, > > > Seva Lapsha > > > > > > On Wed, Apr 11, 2012 at 6:14 PM, Yasuo Ohgaki > > wrote: > > > > > > > Hi all, > > > > > > > > I think my RFC confused people on this list due to improper > > > > descriptions and too much information. Sorry for the confusion. I > > > > revised the RFC so that most important points can be understood at > > > > a > > glance. > > > > > > > > https://wiki.php.net/rfc/nophptags > > > > > > > > Please read again if you've read already and give comments. > > > > Thank you. > > > > > > > > -- > > > > Yasuo Ohgaki > > > > yohgaki@ohgaki.net > > > > > > > > -- > > > > PHP Internals - PHP Runtime Development Mailing List To > > > > unsubscribe, > > > > visit: http://www.php.net/unsub.php > > > > > > > > > >**** > > ** ** > --e89a8f923baa411e3f04c008f61e--