Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88374 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81077 invoked from network); 19 Sep 2015 13:50:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2015 13:50:49 -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 209.85.212.170 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:33301] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/B3-43089-9386DF55 for ; Sat, 19 Sep 2015 09:50:49 -0400 Received: by wiclk2 with SMTP id lk2so94897765wic.0 for ; Sat, 19 Sep 2015 06:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:from:date:to:message-id; bh=IxnJnLt0wn/SX7pK1viTZRWPUYHde4jc+xZmBnatTII=; b=IdOtmh7eVveTbbSDF+Qk1WFrsMgEig19fOsDo55OF/2wI767sgQgwYihW3/kX7yPBZ J0BCZhT5asj5rSVwsZyGwR/jV9FX5fKVf1PqiPTq5lCRdsLEXFf71aMH2hun9q5geHuy xLfugEK9oRjG8CxJrtqhhvodPdTzzA++a7vHunX+QxheuHhCqIfLHJIfV8xwv9wWthTa FhdXVd6BIZq5QiQb3ZN3mTvxi1+1BM49PDKxNL1GqzoeethYYYbBw8Q0hFNUEAbx2bnK uBiGg/dAJnddOJ6aqFO5axsRZmailqHO2EgBkv557F2MFxqhA43jNl+r5CnySblxOi+V U8MQ== X-Received: by 10.194.5.35 with SMTP id p3mr15050740wjp.132.1442670646130; Sat, 19 Sep 2015 06:50:46 -0700 (PDT) Received: from [100.79.33.209] ([213.205.194.85]) by smtp.gmail.com with ESMTPSA id fx2sm3387398wib.24.2015.09.19.06.50.44 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 19 Sep 2015 06:50:45 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <55FD2F61.9010603@lsces.co.uk> References: <55FD2F61.9010603@lsces.co.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----WGDIBSUBB0HOZGDFKDT1M762TJ6U6Q" Content-Transfer-Encoding: 8bit Date: Sat, 19 Sep 2015 14:50:33 +0100 To: Lester Caine ,internals@lists.php.net Message-ID: <8C126BF2-61EF-4296-BF13-E956B4066F4C@gmail.com> Subject: Re: [PHP-DEV] Coding styles ... From: rowan.collins@gmail.com (Rowan Collins) ------WGDIBSUBB0HOZGDFKDT1M762TJ6U6Q Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 On 19 September 2015 10:48:17 BST, Lester Caine wrote: >I get that a lot of people think that the only way forward with PHP is >fully typed, strict checking and blocking anything that may be deemed >to >be risky. However PHP7 has not yet dropped the simple object-less style >of programming that it originally developed from. That is why tidying >up >a simple procedural style of working still has a place. The debate on >'exists()' or to give it a tidier title 'variable_exists()' is more >about just how much of a procedural style of programming remains in PHP >in the future. I agree with the sentiment, but I'm not sure "procedural" is the right keyword here. I know of no other language, however procedural, that allows easy examination of the local symbol table to see if a variable exists. Nor do most procedural languages allow "variable variables" and functionality like extract() and compact(). However, I take the point that, whatever name we give it, this is a style of coding PHP goes some way to supporting, and there's no fundamental reason not to expand that support. The main risk with a multi-paradigm language is it becoming "Jack of all trades, master of none", either because the features themselves are sub-standard, or because people use features designed for one style of coding as stand-ins for other styles. e.g. mixing variable variables and object composition is likely to lead to some confusion. Regards, -- Rowan Collins [IMSoP] ------WGDIBSUBB0HOZGDFKDT1M762TJ6U6Q--