nday, 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:
How would one use your Castable interface to cast a Class "Test" to any of
integer, array or boolean?
From: Seva Lapsha [mailto:seva.lap...@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 past
Thanks.
On Mon, May 14, 2012 at 2:28 PM, Stas Malyshev wrote:
> Hi!
>
> > Not quite. The proposed is a syntactic sugar which is thought to handle
> > any transformation of a value, not necessarily or limited to type or
> > class conversion. It is of course possible to limit the usage to just
> >
Hi!
> Not quite. The proposed is a syntactic sugar which is thought to handle
> any transformation of a value, not necessarily or limited to type or
> class conversion. It is of course possible to limit the usage to just
> that, with any user defined convention or "best practice". In fact it's
> p
> From: Seva Lapsha [mailto:seva.lap...@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
rnals@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
> suggest
Hi,
Not quite. The proposed is a syntactic sugar which is thought to handle any
transformation of a value, not necessarily or limited to type or class
conversion. It is of course possible to limit the usage to just that, with
any user defined convention or "best practice". In fact it's pretty
dist
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 c
Hi!
> 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
I think there's an issue with this idea. As far as I understand, what is
proposed is kind of cast-constructor paradigm
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 Laps
10 matches
Mail list logo