Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84271 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17438 invoked from network); 4 Mar 2015 03:15:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2015 03:15:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=michaeljs1990@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=michaeljs1990@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: michaeljs1990@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:45155] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/C3-22264-4E876F45 for ; Tue, 03 Mar 2015 22:15:49 -0500 Received: by obcuz6 with SMTP id uz6so4227319obc.12 for ; Tue, 03 Mar 2015 19:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jP3xMm1v6jesMhwt6CQYJ0UMVz4SRNwCq8C69PltE0U=; b=DE0NR7WUWKyum8bVRt8tNnKuXlTyA6iWd4ky3ZfLnPVrQ7JSkPFWAfAeb4oo/zQoEr AT68WpEtAiKntXw1UnFoO3/rSMVeRyL7l67638MV26XJ3SaA1vp2b5fLfYibRHq89XIp Sik6pW0nrvP1zPJPPZcQojJuY8kizUKr0gBM89MuDVzacBuQVjKJfY2WbEqo1YQSbuNv 6/i/kZsso2TZK+anLtj2TMP/mt0NLFREP4nFEc+Y9oJnMGiQyXohzczJgm/Mq57XDhJa 2ywpb6V4mHlk9yXRw3Y+97ihagF8n7f2VgZ43PihPNLCTy80/pIOg1FUj7Xm1YmrCrPk 8FMg== MIME-Version: 1.0 X-Received: by 10.60.38.66 with SMTP id e2mr1551931oek.38.1425438945291; Tue, 03 Mar 2015 19:15:45 -0800 (PST) Received: by 10.60.27.74 with HTTP; Tue, 3 Mar 2015 19:15:45 -0800 (PST) In-Reply-To: References: <54F4E29D.7080501@garfieldtech.com> <54F4E93C.80206@gmail.com> <54F4EBEC.2090702@garfieldtech.com> <54F4F3FC.6060501@fischer.name> <54F4FDFB.8010701@lsces.co.uk> <54F5895D.3090002@gmail.com> <554F0C3F-770F-4694-A5AB-FDC54FCCBF00@gmail.com> Date: Tue, 3 Mar 2015 22:15:45 -0500 Message-ID: To: Yasuo Ohgaki Cc: Rowan Collins , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0122772efbb4dc05106ddd50 Subject: Re: [PHP-DEV] Consistent function names From: michaeljs1990@gmail.com (Michael Schuett) --089e0122772efbb4dc05106ddd50 Content-Type: text/plain; charset=UTF-8 Your evaluation is pretty anecdotal. I agree with some points but you need some solid evidence if you are going to rate these languages. Also do you have a list of all the functions you would like to rename or is this a sweeping lets just change everything so it matches and deprecate all the old stuff. Your matrix is a very weak push to do so. If you want to make these changes it would be better to choose a select set such as the array functions and try and push that through or see what that change might look like and if it's really beneficial to userland. On Tue, Mar 3, 2015 at 7:46 PM, Yasuo Ohgaki wrote: > Hi Rowan, > > On Wed, Mar 4, 2015 at 7:12 AM, Rowan Collins > wrote: > > > You are measuring the wrong cost. The cost of adding new names is to > > people writing code: > > > > - additional confusion for new users about why everything has two names > > and which they should use > > - extra effort for new developers to learn the new names, even if they > > only read them in other people's code (it slows me down every time I see > > sizeof() and have to remember it's just an alias of count()) > > - awkward decision for project leaders: use the old names for familiarity > > and compatibility with older versions, or the new ones because they're > > arguably better names > > - if an existing project does choose the new names, the overhead of > > converting all the existing code, with the risk of bugs introduced by > > incorrect automation, noise in commit logs, merge conflicts, etc > > - if a project needs to run on PHP 5, the vigilance required to avoid > > accidentally using the new names when developing on PHP 7 > > > > That's not an exhaustive list, and some of these aren't huge costs, but > > collectively they outweigh the benefit of a slightly more consistent set > of > > names for things. > > > > This is why a more radical change - an OO-style API for scalars and basic > > modules, a fundamentally new set of functions which fulfil a specific > need, > > etc - has the potential for acceptance, and this proposal does not. The > > costs are mostly fixed, so we need to increase the benefits to outweigh > > them. > > > > This is fair discussions. We should care these also. I agree these costs > exist > and shouldn't ignored. > > I have different point of views. It's long term view or new user point of > view. > For me, it outweighs costs you've mentioned. > > Whether we like it or not, people evaluate languages by matrix like > > PHP Ruby Python > OO support 5 5 5 > Flexible syntax 3 5 5 > AOP support 3 3 3 > DbC 1 2 2 > API consistency 1 3 3 > API richness 4 4 4 > 3rd Party Libs 4 4 4 > Performance 4 3 3 > Security 1 4 4 > Type Safety 1 4 3 > > Although this is rough evaluation by me, people would have somewhat similar > matrix. > > API consistency 1 3 3 > > The reasons why people evaluate PHP like this are > > - PHP has API inconsistency even for most basic APIs like phpversion(), > htmlspecialchars(), etc > - Even bundled modules have non standard function names. > - API parameter ordering is inconsistent. > - Return type for errors are inconsistent. e.g. Wrong number of param > returns NULL, while others return FALSE mostly. > - Some basic internal classes do not raise exception for instantiation > failure. > - and so on. > > I'm not saying Ruby's APIs are organized very well. For example, user has > to search > around proper API even for URI escape provided by various modules. > Therefore, I > evaluate it as 3. > > Having this kind of evaluation matrix is not good for PHP in the long run. > IMHO. > > > BTW, > > Security 1 4 4 > > I evaluate like this because PHP is to weak against fatal security breach. > i.e. Script Inclusions. > You'll see my view and the reason why I focus in some area strongly from > the matrix. Although > I didn't participate scalar type hint RFC discussion much, I cannot wait to > have StrictSTH also. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > --089e0122772efbb4dc05106ddd50--