Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34085 invoked from network); 30 Jul 2014 12:38:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2014 12:38:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.172 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.172 mail-we0-f172.google.com Received: from [74.125.82.172] ([74.125.82.172:42391] helo=mail-we0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/2D-29261-E47E8D35 for ; Wed, 30 Jul 2014 08:38:39 -0400 Received: by mail-we0-f172.google.com with SMTP id x48so1148608wes.3 for ; Wed, 30 Jul 2014 05:38:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=B2jyNT/9AsafPD6LqY45l+CaF4v47Pj9TjkZ8gZK7YQ=; b=q5DNO5J2zaLMNZePJGVkCI831eWivbtQVzvID5kBGoKo7YRzWlCBfq9WDBT8OXYI35 uYRH4Cj0hcRnwMMp6UfWq5k8JZbtgRjLH+AuICMn/pK6VXfeTFqBTQF9k5mfhrhr/NhZ LKPqovE7yjrSA9LQkEe29Awajx9toTYYX7R+3fH65Sy43iFR46oQsyT0Y+pAvRBgbMJK MGzds+oDlJkd9iXbyHPoZ3CasDYOVwDVezdI8ybU80DSGDs7qoiL1IBlbpVvS3kwQcHy WkcIkdY6utt8jksJbcvJlEOF5c3euq/63VEI+L6KROrgXI5fotOU9rQ3tA+PkOFwC3Ch gcnQ== X-Received: by 10.180.93.104 with SMTP id ct8mr6681294wib.30.1406723931136; Wed, 30 Jul 2014 05:38:51 -0700 (PDT) Received: from [192.168.0.177] ([62.189.198.114]) by mx.google.com with ESMTPSA id lg7sm5299499wjb.9.2014.07.30.05.38.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Jul 2014 05:38:50 -0700 (PDT) Message-ID: <53D8E693.8000406@gmail.com> Date: Wed, 30 Jul 2014 13:35:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] "PHP" namespace? From: rowan.collins@gmail.com (Rowan Collins) Yasuo Ohgaki wrote (on 28/07/2014): > - Consistent naming > - Consistent parameter order > - Graceful function/class/interface deprecation > (We know what we should do for these, right?) I'm not sure if this was meant sincerely, or slightly tongue-in-cheek, but no, we definitely don't. It comes up on the list every few months (I've only been subscribed a short time, but this is at least the 4th time I've seen), and the general conclusion is there isn't an easy answer, and that adding more namespaces doesn't particularly help. Making small changes, such as extra function aliases, or identical versions of existing functions with switched parameter order, just adds to the overall confusion and list of special cases that users have to carry around when reading and writing code. That leaves the option of making larger changes, to design a clear new API, deliberately *minimising* the similarity to existing functions so it's clear when you're using what. The popular option for that is migrating chunks of functionality to OOP (as with DateTime), and to pseudo-OOP "scalar methods" (of which there are a couple of prototypes) - not to turn PHP into a pure OOP language, just to give us a chance to design a more consistent library of functions. Regards, -- Rowan Collins [IMSoP]