Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84110 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40146 invoked from network); 1 Mar 2015 17:23:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2015 17:23:15 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.177 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.177 mail-we0-f177.google.com Received: from [74.125.82.177] ([74.125.82.177:44005] helo=mail-we0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/6A-63732-10B43F45 for ; Sun, 01 Mar 2015 12:23:14 -0500 Received: by wesu56 with SMTP id u56so29144510wes.10 for ; Sun, 01 Mar 2015 09:23:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to:cc :message-id; bh=M5TyM6lm3G3OKEgz9EuYPpTfHQ+cVSkn0XYoSm0Uyi0=; b=Zz+ggyu/4uL0QtWzyYLC6etZdK1mrOFLsJ0uGdWdoBJpAEYjQGSXnLVSnM9TqrOtki 1IRWp625DF6zlU0ouI143Ej3dUMgtLaPJ/fcvFgQlNVZ4cZp27GKF1jjxsv5RJdx9J/U tFkTU0BKNhiwkoHVm5Ndz5Kpm159yFM6JbZhtGgu9XZJV2rzxoiVHByWUqOSOqNE7oTz bJs5DQPY2ruaWcMy5wiBxO/GCmIqaHfCG4ovJkOSCMRkYf0/2LBKdrMwwrcsIppze0Y5 /epsNN1sbVm3dZ8MoaSR7emM4UBGgdGphOeOLfpRYa2R9hbjEXezlluVjfV3htqBtRyd 48oA== X-Received: by 10.194.97.139 with SMTP id ea11mr23429622wjb.108.1425230590546; Sun, 01 Mar 2015 09:23:10 -0800 (PST) Received: from [192.168.0.2] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id j5sm12376887wie.3.2015.03.01.09.23.09 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Mar 2015 09:23:09 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: References: <5E7DF0C5-BCB4-432A-A876-A5057FEBFBB5@gmail.com> <54F320E9.5000706@fischer.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Sun, 01 Mar 2015 17:22:05 +0000 To: "S.A.N" ,Markus Fischer CC: internals Message-ID: <61461C0A-4C91-4114-BC71-EF5E743FEBEF@gmail.com> Subject: Re: [PHP-DEV] Consistent function names From: rowan.collins@gmail.com (Rowan Collins) On 1 March 2015 15:18:09 GMT, "S.A.N" wrote: >Maybe better implement for method calls on primitive types in PHP 7? >https://github.com/nikic/scalar_objects We'd have a whole bunch of tough decisions to make - does HTML escaping really belong as a method of the string type? What are printf and scanf methods of? Etc Without the ability for a user to patch the existing type (a major departure from current classes), you basically still have a bunch of function aliases. What motivation would there be to change dozens of instances of strpos($a, $b) to $a->indexOf($b)? In this respect, some version of UString makes more sense, because (if well-defined) it actually gives users some advantage over the current functions. Regards, -- Rowan Collins [IMSoP]