Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70968 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68745 invoked from network); 2 Jan 2014 20:01:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2014 20:01:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=florinpatan@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=florinpatan@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.169 as permitted sender) X-PHP-List-Original-Sender: florinpatan@gmail.com X-Host-Fingerprint: 209.85.216.169 mail-qc0-f169.google.com Received: from [209.85.216.169] ([209.85.216.169:46660] helo=mail-qc0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/E3-48256-D75C5C25 for ; Thu, 02 Jan 2014 15:01:01 -0500 Received: by mail-qc0-f169.google.com with SMTP id r5so14181227qcx.28 for ; Thu, 02 Jan 2014 12:00:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=GeATywvAddMtipYxdy0ClNOabzb60oIQIRHLmvyMXGs=; b=isOX5jI2uSWgnjfV3ZsD1NIu5hIFksWo+tuSN88Abre+Wv0WeePIkBoUk3qK6HFkjh X3Fcwal2a4s3k4hHfEFRaZWpj52/MuwsgL2PUr4r7SvYvQM1GaWu80eBhviqtOkkV9/q sAoA2hxNP8gtAi31ypGNOZbv9wJSB9HIXXC1VvUI8rwksbO2F4VTfHHev241zl+I84fp Cgmi/yRqRclj7rBxjGZ+EtDGhiOAgduUpUrir8EyUGyy8fvAehecyCIeCGibm6P7b+R+ ZKhgz4kKkZgSBfRzz9N8cOvbVioClDVX1LOqEKWGDvZ7Da0JabJmVz0Sop/yhFY0qRdx Gs8w== X-Received: by 10.224.56.5 with SMTP id w5mr138682429qag.60.1388692859406; Thu, 02 Jan 2014 12:00:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.100.205 with HTTP; Thu, 2 Jan 2014 12:00:29 -0800 (PST) In-Reply-To: References: <52BE8F35.9090104@b1-systems.de> <52C4A415.3040101@gmail.com> <52C4ADC8.1090009@lerdorf.com> <52C510CF.3030604@garfieldtech.com> <0bae3e8fb5acff88a1aba0bea6bd264d@yamiko.org> Date: Thu, 2 Jan 2014 21:00:29 +0100 Message-ID: To: Yasuo Ohgaki Cc: Robert Parker , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [PHP6] Function name consistency From: florinpatan@gmail.com (Florin Patan) >On Thu, Jan 2, 2014 at 8:42 PM, Yasuo Ohgaki wrote: > HI all, > > On Fri, Jan 3, 2014 at 2:49 AM, Robert Parker wrote: > >> I would consider myself one of those php developers. I know very little c, >> and java. Javascript is my second language after php. Most php developers >> have yet to move towards 5.3 and don't know how to even use namespaces or >> what they are. They often use wordpress or drupal which are very slow to >> adapt. >> >> Considering how slow and hard it is for most php developers to migrate to >> new versions of php I do not think creating aliases or changing the names >> would be beneficial. Different developers would use different aliases and >> it would confuse a lot of php developers. >> > > This proposal does not intend to force users to adopt new names, but ensure > PHP popularity in the long run. > > Are new users willing to learn language that have full of inconsistent > names > even for basic/standard/default functions? > > My intention to have consistent function names for old function is > > - to ensure PHP as attractive language to learn even 10 or 20 years later. > > I agree that adoption of new feature is slow. If we made function names > consistent now, there would be codes around uses historic names 10 years > later, but it does not matter for the purpose of this proposal. > > De facto Standard names such as strchr() would be acceptable names even > 20 years from now. Other functions such as GD functions are better to have > consistent names. > > Please consider this proposal is for new users that will learn PHP from now > or > in the future. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net If you look at golang you'll see they have 'go fix' http://golang.org/cmd/fix/ which helps mitigate the effects of language changes automatically. I suppose it wouldn't be a problem with having a tool that can generate an AST out of a .php file and dump it back to a newer syntax (as long as only the function / method / classes name and parameter order is changing). The issue I see is that people are stuck into the: 'bbbut it's using the underlying uber-duper library and if a dozen people know about it then it must be a good thing' approach. Also, having a flag in the engine, with some ini_set(blah, true) seems like a poor decision imo. Fix the problem at the source, don't clutter the engine because the php users are too lazy to run an automated tool. And yes, I do suggest that PHP should start to impose a certain formatting, since it would be needed by this tool, but if you look past the initial: ':(((( I want my tabs / spaces back' or whatever, in a couple of days / weeks everyone would forget about the formatting issues and just focus on the code. @Yasuo, if you really want to keep PHP attractive maybe you should look on what golang is doing because imo they served every other languages a lesson in tooling and not only. ---- Florin Patan / @dlsniper https://github.com/dlsniper http://www.linkedin.com/in/florinpatan