Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68296 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19447 invoked from network); 24 Jul 2013 05:29:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2013 05:29:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.41 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.41 mail-la0-f41.google.com Received: from [209.85.215.41] ([209.85.215.41:55847] helo=mail-la0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/81-07084-1266FE15 for ; Wed, 24 Jul 2013 01:29:05 -0400 Received: by mail-la0-f41.google.com with SMTP id fn20so6904333lab.14 for ; Tue, 23 Jul 2013 22:29:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Y4ywb3j1hg32omTha4DR9HfkXVDrTbk4xuaeo1NbDBw=; b=ko6Vc8JnJjPvAE0a8q3v0yIP0k6Qyu4tVE+fwsNTAawdcyEpKG50y3EFwfwN8oS2D5 GTKQG8DtodmHNEfJCpRYpL95lSMzwmza5C5NtEmKq6ibww1ZF3QbCoQnhW9fl3PUqqrs ZmHvA7i9cEMABa5KLq1yhSAxjRofKJRLl0/rowG+I2JLchB94uEyIjseejDUkS8e2xfB +dAIcVf1liTa4Bz+kdKHV3hL1nOi9J/8o/ny/woJQiMl1mJHoYrqMU/610oGn7FJN01n ZQYKO8FORrOlx83BCwfu92Ng3M8lYjHSpQm8ktcjpG2fTnjNTSp47tq0TzIVJObFnOUe lQgA== X-Received: by 10.112.58.135 with SMTP id r7mr15946984lbq.89.1374643742209; Tue, 23 Jul 2013 22:29:02 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.130.129 with HTTP; Tue, 23 Jul 2013 22:28:22 -0700 (PDT) In-Reply-To: <51EF593D.5080005@sugarcrm.com> References: <60BF8DD5-FEEA-47D9-834F-6C7FDEF3B879@wiedler.ch> <51EF593D.5080005@sugarcrm.com> Date: Wed, 24 Jul 2013 14:28:22 +0900 X-Google-Sender-Auth: KSCGH9g9a3q_n5EhsQHUgd1rvlc Message-ID: To: Stas Malyshev Cc: Igor Wiedler , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8f8388cff27e1404e23b2f32 Subject: Re: [PHP-DEV] [RFC] Importing namespaced functions From: yohgaki@ohgaki.net (Yasuo Ohgaki) --e89a8f8388cff27e1404e23b2f32 Content-Type: text/plain; charset=UTF-8 Hi Stas, 2013/7/24 Stas Malyshev > > This patch good for extending PHP usability. IMHO. > > Modern popular languages like Ruby and Javascript has way to > extend/modify > > existing object/method behaviors. > > PHP has it too, it is called runkit. However it makes reasoning about > the code much harder, so I do not think it is worth it to make it part > of standard PHP language. However, I do not see how this is related at > all to the RFC being discussed. RunKit is nice, but it's not a standard module and I suppose it will not be standard. This might be a poor example of usefulness of overriding existing class/method, but proposed feature may be used for monkey patch for instance. http://en.wikipedia.org/wiki/Monkey_patch There are issues as discussed in Wiki. So not having such feature is valid option, but it's nice to have feature. Make strlen() return number of chars instead of bytes, etc. I don't have concrete idea right now. If there is cleaver way that avoids disadvantages, I would like to see such feature by default since almost all PHP competitors have this. Any ideas that satisfy most of us? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --e89a8f8388cff27e1404e23b2f32--