Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88401 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14355 invoked from network); 22 Sep 2015 08:54:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2015 08:54:47 -0000 Authentication-Results: pb1.pair.com header.from=stig.bakken@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stig.bakken@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: stig.bakken@gmail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:33016] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/B7-56639-75711065 for ; Tue, 22 Sep 2015 04:54:47 -0400 Received: by wiclk2 with SMTP id lk2so182009641wic.0 for ; Tue, 22 Sep 2015 01:54:43 -0700 (PDT) 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=v/5eLrA7Di2uQvn9XuoSkVm2R4ZUTdmOXDOb/wDcn28=; b=T4iozPL9v8tt1c/l8DmwkUu08t6Eobf3VAls5EvJ4sjD/wPgPTr5I/6SKClGDo7aY0 gFCe3kwUAPpNChfxA/jx2MYGWLVUB8NScR5ad9kmbthYvi7Z9zx3/VwdsV3ToN1a+Lrr 0xLhwopkep26l4UhgwX9ZQh3ES3wgJfr+VIBPM2l+Fbkqv/C8TxZLvDMcxLN8dPvdL7t HN8CfcxKKi8xpojO/d8IlQ4BxPXWE+HmPtQzpjCaAJMUYgRH75dgaSn2/GlETcWxD4Oi Xfi1AC/PVe9RlQ8YXDAffF76GUam+qwgVwHp5EfoeC3NYtMd8A2smLcpE06TOn6M287q Ec5g== MIME-Version: 1.0 X-Received: by 10.180.8.200 with SMTP id t8mr18935145wia.34.1442912083512; Tue, 22 Sep 2015 01:54:43 -0700 (PDT) Received: by 10.194.157.97 with HTTP; Tue, 22 Sep 2015 01:54:43 -0700 (PDT) Received: by 10.194.157.97 with HTTP; Tue, 22 Sep 2015 01:54:43 -0700 (PDT) In-Reply-To: <8C126BF2-61EF-4296-BF13-E956B4066F4C@gmail.com> References: <55FD2F61.9010603@lsces.co.uk> <8C126BF2-61EF-4296-BF13-E956B4066F4C@gmail.com> Date: Tue, 22 Sep 2015 10:54:43 +0200 Message-ID: To: Rowan Collins Cc: internals@lists.php.net, Lester Caine Content-Type: multipart/alternative; boundary=f46d044304e62e12b30520522600 Subject: Re: [PHP-DEV] Coding styles ... From: stig.bakken@gmail.com (Stig Bakken) --f46d044304e62e12b30520522600 Content-Type: text/plain; charset=UTF-8 On Sep 19, 2015 15:50, "Rowan Collins" wrote: > > 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. Not to forget that something like variable_exists() would have to be a language-level statement to avoid notices being raised. So while having a more consistent syntax would be kinda sweet, we'd be stuck with maintaining BC forever, and there will always be those "it's not as simple as that" cases. I think there are much better uses of the community's time. - Stig --f46d044304e62e12b30520522600--