On Thu, Jun 13, 2019 at 4:23 PM Steven Wade <stevenwad...@gmail.com> 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
> > benefit from it?
>
> Originally, it was inspired by seeing Laravel's use of Arrayable as an
> interface and if something implements that, calling that class' `toArray()`
> method, and wishing that was built in so that frameworks didn't re-invent
> the wheel every time.
>

Interestingly, my work day today is spent mostly removing this kind of
behavior from a codebase riddled by it, replacing it with explicit
conversions where needed.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

Reply via email to