How would one use your Castable interface to cast a Class "Test" to any of 
integer, array or boolean?

From: Seva Lapsha [mailto:[email protected]]
Sent: Monday, May 14, 2012 12:19 PM
To: Clint Priest
Cc: [email protected]
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 
<[email protected]<mailto:[email protected]>> 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:[email protected]<mailto:[email protected]>]
Sent: Monday, May 14, 2012<tel:2012> 6:18 AM
To: Clint Priest
Cc: [email protected]<mailto:[email protected]>
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<tel:2012> at 7:27 PM, Clint Priest 
<[email protected]<mailto:[email protected]>> 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:[email protected]<mailto:[email protected]>]
> > Sent: Wednesday, May 09, 2012<tel:2012> 4:56 PM
> > To: [email protected]<mailto:[email protected]>
> > 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<tel:2012> at 6:14 PM, Yasuo Ohgaki 
> > <[email protected]<mailto:[email protected]>>
> 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
> > > [email protected]<mailto:[email protected]>
> > >
> > > --
> > > PHP Internals - PHP Runtime Development Mailing List To
> > > unsubscribe,
> > > visit: http://www.php.net/unsub.php
> > >
> > >
>

Reply via email to