Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78562 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63133 invoked from network); 2 Nov 2014 17:17:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Nov 2014 17:17:24 -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.53 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.53 mail-wg0-f53.google.com Received: from [74.125.82.53] ([74.125.82.53:65243] helo=mail-wg0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/00-62688-0F666545 for ; Sun, 02 Nov 2014 12:16:33 -0500 Received: by mail-wg0-f53.google.com with SMTP id b13so9542715wgh.40 for ; Sun, 02 Nov 2014 09:16:29 -0800 (PST) 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=jFrZ9wf+jsavXiPwEiK0nuXOyZscaJrKVs/i8C7WXUM=; b=kz9aUzB/46RV4X4Ox4Ly9VBGQ5R4C5PlDcBkmhrb2axjj+TsiZ0F5ajLH0UxlDdp2V M+CKeekhMD2mxV8HAhn+mcuVXys5XI3IS7iO4OCqcDAxFd3t2Jmz6/nHXv6UVc/LafcT MqcntjC+QlS43ARtVGvyA09I8xEcgwd1rrnK8jHnMo6i7h1xSqf5PW+vnBHSSEQiCZsa gvpLq7f5iuawhIRIXUP7M8jdSy+yuLPdhrLibajdKGtwZo+xTVSXASmzQljlK5RFK+pz 6ssXLBoPjZ5i+Kz4VDpVrPrmOp9+yevzvq2xR+NWGncy42jz8iHr+k74WyrgoE5yownx WCmQ== X-Received: by 10.180.38.34 with SMTP id d2mr10684739wik.55.1414948589286; Sun, 02 Nov 2014 09:16:29 -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 t7sm16491367wjy.24.2014.11.02.09.16.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Nov 2014 09:16:28 -0800 (PST) Message-ID: <545666C3.4080106@gmail.com> Date: Sun, 02 Nov 2014 17:15:47 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <5455FD7E.1020705@lsces.co.uk> In-Reply-To: <5455FD7E.1020705@lsces.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Personal working styles ... From: rowan.collins@gmail.com (Rowan Collins) On 02/11/2014 09:46, Lester Caine wrote: > The current discussion on http response objects and other aspects of the > transmission process has brought out a few more 'what the ...' from some > of you and as with a lot of the 'modern' discussions, the reasons for > wanting something tend to be wrapped in a lot of assumptions that the > rest of us understand exactly what is being discussed. In many cases > I'll be frank - despite starting programming back in the early 1970's > much of the debate goes over my head! I think there's a good point here, that we need to make sure - particularly in the core of the language - that we maintain PHP's long-standing support for writing quick, unstructured programs, without a lot of boilerplate. Ideally, new use-cases which are difficult or awkward with current functions would be supported by simply adding new functions in the same style as those that already exist. However, PHP's standard library of functions is notoriously inconsistent, so the right way to add such new functionality isn't always obvious, and sometimes doing so would just add to existing confusion or complexity. In such circumstances, it is sometimes right that we look at designing a new API which overlaps with the old; if this can be done in such a way that the new API is still simple for the simple cases, all the better, but if not, the old API needs to be maintained as more than just a begrudging compatibility shim. The superglobals for HTTP requests are probably a good example of this: we definitely need to keep them for compatibility reasons, but further than that we mustn't start thinking of them as inferior or deprecated if their replacement requires an additional 10 lines of boilerplate to be added to every 1-page PHP script. As for PHP-FIG, its mission is rather different - for those people who are writing framework-based applications, and modules designed to be used by those applications, it is useful to have a set of agreed conventions ("Recommendations") to work with. Some of these are basically just arbitrary choices, like agreeing whitespace conventions so that code shared from one project to another doesn't look out of place. Others can be useful even for smaller projects - for instance, if you intend to pass around a logger object, you can make it implement PSR-3, making it trivial to switch over to a third-party library like Monolog if you later decide that would be beneficial. -- Rowan Collins [IMSoP]