I do think that some of  the runkit features should not be included in PHP
core but I wish to focus on extending classes with extension methods,
constants, traits and members.

Just like all other complicated and powerful features in PHP, one should
use them with a good reason and when he/she knows exacly what he/she is
doing - but we should provide the tools and ability to do that - that's
what I think..

I see the main usage for extension methods within frameworks and other big
applications that allows third-party integration such as CMS, forums
software etc. - in such kind of applications, extension methods can be very
useful, and you can take for example the many usage of this in
ASP.NET<http://asp.net/> applications
that uses this concept (even if we'll take Objective-C, you can find on the
net many implementation of features for UI controls that was added via
extension method since there's no OO based reason to create a child class -
for example, many added method for setting background image to UIView type
object as an extension method).

I don't think that this features should remain in PECL package (that's the
reason I've created this discussion) since frameworks and software that
third-party users will use should not relay on PECL packages... many users
who use frameworks and CMS use shared hosting enviorment and don't have
permissions to install PECL packages - if we want to bring this feature and
give such scripts to use this features we shall deeply integrate it to the
core of PHP - just like I've suggested above, I think that a new keyword or
syntax should be introduced for this usage.

On Fri, Aug 3, 2012 at 2:22 AM, Sara Golemon <poll...@php.net> wrote:

> On Thu, Aug 2, 2012 at 4:17 PM, Leigh <lei...@gmail.com> wrote:
> >> Sandboxing: Complicated by the fact that it only works in a threaded
> >> build, can't transfer all types (e.g. resource, complex objects), and
> >> can't run concurrently.  Until/unless these problems can be
> >> meaningfully solved, I wouldn't consider it a functional
> >> implementation.
> >
> > To me the "thread thing" feels like the dirty hack workaround
> > _because_ it's in PECL, and this is the only option available.
> >
> In all seriousness, I'd love to hear how you'd do Sandboxing without
> using the tsrm context hack I used in runkit.  That approach had
> nothing to do with being in PECL, it had to do with that being the
> only mechanism available to swap globals in and out at will.
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to