Hey Benjamin,
On Thu, Aug 29, 2019, 05:09 Benjamin Eberlei wrote:
>
>
> On Sun, May 5, 2019 at 5:08 PM Nicolas Grekas
> wrote:
>
>> Le sam. 4 mai 2019 à 18:37, Marco Pivetta a écrit :
>>
>> > Hi Steven,
>> >
>> > As it currently stands, the array cast is the only operation capable of
>> > expo
On Sun, May 5, 2019 at 5:08 PM Nicolas Grekas
wrote:
> Le sam. 4 mai 2019 à 18:37, Marco Pivetta a écrit :
>
> > Hi Steven,
> >
> > As it currently stands, the array cast is the only operation capable of
> > exposing object state without triggering any kind of access guards: it is
> > very much
On Thu, Jun 13, 2019 at 4:23 PM Steven Wade wrote:
> > I guess that's what it comes down to, what *specific* use cases would
> this
> > feature be intended to help with? Is there some code of your own that
> > inspired you to propose it, or something you've seen publically that
> would
> > benefi
Apologies for the super late response:
> A recursive method would certainly have more value, because it actually
> does something more than translate one syntax to another. On the other
> hand, the use case that comes to mind is serialization, and we already have
> more specific methods and system
Hi Kalle,
> On May 4, 2019, at 12:08 PM, Kalle Sommer Nielsen wrote:
>
> Hi
>
> Den lør. 4. maj 2019 kl. 17.58 skrev Steven Wade :
>>
>> Hi Internals team!
>>
>> I have an idea for a feature that I'd love to see in the language one day
>> and wanted to run the idea by you all.
>>
>> The ide
Hi Marco,
> The alternative is to expand the reflection API with an array cast operation
> in there, and then migrate existing userland usages to that to retain BC.
That's an interesting proposal - adding new reflection abilities. Hm..
> In addition to that, as someone that used to write a lot
Hey Steven,
On Tue, 7 May 2019, 14:25 Steven Wade, wrote:
> > I’m not against the proposal. I’m mainly asking if there are other ways
> in the language today to accomplish similar things. I would prefer to see
> interfaces used over more magic methods (something like ArraySerializable).
>
> A T
> On May 7, 2019, at 8:52 AM, Stephen Reay wrote:
>
>
>> On 7 May 2019, at 19:47, Steven Wade wrote:
>>
>>> Maybe I’m missing the point (I’ve never used it) of VarDumper, but isn’t
>>> this type of thing exactly why the `__debugInfo` magic method exists?
>>
>>
>> I can't speak for the ex
> On 7 May 2019, at 19:47, Steven Wade wrote:
>
>> Maybe I’m missing the point (I’ve never used it) of VarDumper, but isn’t
>> this type of thing exactly why the `__debugInfo` magic method exists?
>
>
> I can't speak for the exact reason a library like VarDumper is using casting
> versus __
> Maybe I’m missing the point (I’ve never used it) of VarDumper, but isn’t this
> type of thing exactly why the `__debugInfo` magic method exists?
I can't speak for the exact reason a library like VarDumper is using casting
versus __debugInfo, but in trying to find a substitute this morning, I
> On 7 May 2019, at 19:22, Nikita Popov wrote:
>
> On Tue, May 7, 2019 at 2:20 PM Steven Wade wrote:
>
>>> I want to weight in with what Marco expressed. I have the very same
>> concerns and they are major ones for many use cases. Mine is VarDumper.
>>>
>>> Please don't do this the way it is
> We can add a separate function to provide this functionality. We should do
> that anyway because it's both clearer and because (array) already requires
> some special handling for ArrayObject that could be avoided.
Are you talking about adding a separate function to replace my proposed
__toA
> I’m not against the proposal. I’m mainly asking if there are other ways in
> the language today to accomplish similar things. I would prefer to see
> interfaces used over more magic methods (something like ArraySerializable).
A Twitter user pointed out that 7.4 is adding two new magic methods
On Tue, May 7, 2019 at 2:20 PM Steven Wade wrote:
> > I want to weight in with what Marco expressed. I have the very same
> concerns and they are major ones for many use cases. Mine is VarDumper.
> >
> > Please don't do this the way it is described.
>
>
> Is there a way that you'd suggest? First
> I want to weight in with what Marco expressed. I have the very same concerns
> and they are major ones for many use cases. Mine is VarDumper.
>
> Please don't do this the way it is described.
Is there a way that you'd suggest? First of all, TIL some cool things about
"(array) $foo" and how V
> On May 6, 2019, at 09:37, Steven Wade wrote:
>
> That being said, adding an interface like `ArraySerializable` might be nice
> too. I'm seeing technical arguments against adding magic casts, but (just
> spit-balling here), what if a class implemented a new `ArraySerializable`
> interace with
> On May 5, 2019, at 10:59 AM, Ben Ramsey wrote:
>
>
>> On May 4, 2019, at 09:58, Steven Wade wrote:
>>
>> Hi Internals team!
>>
>> I have an idea for a feature that I'd love to see in the language one day
>> and wanted to run the idea by you all.
>>
>> The idea is to add a new magic met
Le sam. 4 mai 2019 à 18:37, Marco Pivetta a écrit :
> Hi Steven,
>
> As it currently stands, the array cast is the only operation capable of
> exposing object state without triggering any kind of access guards: it is
> very much required for anything that works with reflection and typed
> propert
> On May 4, 2019, at 09:58, Steven Wade wrote:
>
> Hi Internals team!
>
> I have an idea for a feature that I'd love to see in the language one day and
> wanted to run the idea by you all.
>
> The idea is to add a new magic method "__toArray()" that would allow a
> developer to specifiy ho
Hi Steven,
As it currently stands, the array cast is the only operation capable of
exposing object state without triggering any kind of access guards: it is
very much required for anything that works with reflection and typed
properties, and possibly the only operation in PHP that operates on stat
> On May 4, 2019, at 11:08, Kalle Sommer Nielsen wrote:
>
> Hi
>
> Den lør. 4. maj 2019 kl. 17.58 skrev Steven Wade :
>>
>> Hi Internals team!
>>
>> I have an idea for a feature that I'd love to see in the language one day
>> and wanted to run the idea by you all.
>>
>> The idea is to add
Hi
Den lør. 4. maj 2019 kl. 17.58 skrev Steven Wade :
>
> Hi Internals team!
>
> I have an idea for a feature that I'd love to see in the language one day and
> wanted to run the idea by you all.
>
> The idea is to add a new magic method "__toArray()" that would allow a
> developer to specifiy h
> I find it easy to imagine that objects not implementing __toArray() would
> continue to exhibit that behavior.
Obviously. So what about code that operates on this behavior, should
that then suddenly break if the object implements an __toArray()
method? That sounds wrong to me
--
regards,
Ka
Hi Steven,
> The idea is to add a new magic method "__toArray()" that would allow a
> developer to specifiy how a class is cast to an array. The idea is the same
> mentality of __toString(), but, for arrays.
I'd like to see this as well.
--
Paul M. Jones
pmjo...@pmjones.io
http://paul-m-jone
Hi Internals team!
I have an idea for a feature that I'd love to see in the language one day and
wanted to run the idea by you all.
The idea is to add a new magic method "__toArray()" that would allow a
developer to specifiy how a class is cast to an array. The idea is the same
mentality of _
25 matches
Mail list logo