Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70952 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16876 invoked from network); 2 Jan 2014 08:07:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2014 08:07:39 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.177 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.177 mail-lb0-f177.google.com Received: from [209.85.217.177] ([209.85.217.177:33074] helo=mail-lb0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/40-14580-94E15C25 for ; Thu, 02 Jan 2014 03:07:39 -0500 Received: by mail-lb0-f177.google.com with SMTP id q8so7075220lbi.36 for ; Thu, 02 Jan 2014 00:07:31 -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=kOwmVohBlYbzEG8JO1Gsb7Dnc4ZHZw7P0xgHvojpOI4=; b=tLHBcRj/N7yynCiW4QTbHhCoUpEsT6xwPpWvvZUrKxxmfDfj39NH0Pkgz1FoMPu+lf PPUk1uFM3TGmcqQD3KFudxavTkpQtWfQxzf0FNiPj9MX0lE6bIQwQ03ZlncCtRWzjfxC TI3VVvoi+sRPLv5d3Hknm/tygyQCvu3I8QzQ4GVsRJ2MAfFGEgIEnzSshEynAKvJxNjT PU20Z7NOWKbjuK7OBSYjwHkeIxod1TlegnrqftAmnFhfFkoRyNJPigIoFM8mgQA3sglU OvfBB/5E7Hzi5qX4o/KaudL5Eszfwtd9qoOas3qYsiTzRUiUmH89bTelQuR2e5coZNDD A8Bg== MIME-Version: 1.0 X-Received: by 10.152.36.101 with SMTP id p5mr2126450laj.67.1388650051153; Thu, 02 Jan 2014 00:07:31 -0800 (PST) Received: by 10.112.35.134 with HTTP; Thu, 2 Jan 2014 00:07:31 -0800 (PST) Received: by 10.112.35.134 with HTTP; Thu, 2 Jan 2014 00:07:31 -0800 (PST) In-Reply-To: References: Date: Thu, 2 Jan 2014 09:07:31 +0100 Message-ID: To: Yasuo Ohgaki Cc: PHP internals Content-Type: multipart/alternative; boundary=089e0158b5bc04328d04eef84978 Subject: Re: [PHP-DEV] [PHP6] Function name consistency From: pierre.php@gmail.com (Pierre Joye) --089e0158b5bc04328d04eef84978 Content-Type: text/plain; charset=UTF-8 On Dec 28, 2013 1:58 PM, "Yasuo Ohgaki" wrote: > > Hi all, > > I know this has been discussed before, but I'll try again. > We have following coding standard > > 1. Function names for user-level functions should be enclosed with in > the PHP_FUNCTION() macro. They should be in lowercase, with words > underscore delimited, with care taken to minimize the letter count. > Abbreviations should not be used when they greatly decrease the > readability of the function name itself:: There are a couple of solutions to this problem. 1. Change all the existing functions signatures. Bad idea per se as we can forget any fast adoption, if any at all. Will be very painful to migrate existing code 2. Add aliases all around. Not a big fan of that one either. It clutters the php NS a lot without factual gains 3. Try to implement nickic's prototype to add methods to scalar related types, should work with complex types as well I would prefer to give 3. a try, while it could be tricky to implement a technically acceptable solution. Pros: . It will bring consistent APIs . does not add dozen of aliases for little gains . fully BC . fits more to current development habits Cons: . still have to be careful by designing the new "methods" Cheers, Pierre --089e0158b5bc04328d04eef84978--