Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85051 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21906 invoked from network); 16 Mar 2015 13:45:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2015 13:45:40 -0000 Authentication-Results: pb1.pair.com header.from=eli@eliw.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=eli@eliw.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain eliw.com designates 69.195.198.246 as permitted sender) X-PHP-List-Original-Sender: eli@eliw.com X-Host-Fingerprint: 69.195.198.246 mx-mia-1.servergrove.com Received: from [69.195.198.246] ([69.195.198.246:48853] helo=mx-mia-1.servergrove.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FD/F8-03331-197D6055 for ; Mon, 16 Mar 2015 08:16:02 -0500 Received: from [69.195.222.125] (helo=smtp2.servergrove.com) by mx-mia-1.servergrove.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77) (envelope-from ) id 1YXUsB-0006OT-7D for internals@lists.php.net; Mon, 16 Mar 2015 13:15:59 +0000 Received: from [69.136.226.104] (port=50993 helo=crossbow.local) by smtp2.servergrove.com with esmtpsa (UNKNOWN:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1YXUsB-0004iz-24; Mon, 16 Mar 2015 13:15:59 +0000 Message-ID: <5506D789.4080705@eliw.com> Date: Mon, 16 Mar 2015 09:15:53 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: internals@lists.php.net References: <5504EF9D.1000707@gmail.com> <55064508.6050206@eliw.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1J4smuoS86s0pVKfdC2ol35oeXRpKRmVq" Subject: Re: [PHP-DEV] [RFC][PRE-VOTE] In Operator From: eli@eliw.com (Eli) --1J4smuoS86s0pVKfdC2ol35oeXRpKRmVq Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 3/15/15 11:05 PM, Yasuo Ohgaki wrote: > Hi all, > > On Mon, Mar 16, 2015 at 11:50 AM, Eli wrote: >> Currently, I can speak for myself, I almost always find myself doing a= >> 'backup' step in coding. Because in this situation my process become= s: >> >> if ($zebra ... Oh wait, can't do that, need to use in_array >> >> if (in_array( ... Oh wait, what's the order of parameters again? dang= it, >> hit php.net or find a recent use. >> >> if (in_array($zebra,$zoo)) {} ... *shew* >> >> In the end, yes, you can argue that this is a small thing. But I bel= ieve >> that the simpler cognitive path that one follows with this new syntax = will >> bring some great benefit to coders. > This is one of the issue what I'm trying to fix by this RFC. > https://wiki.php.net/rfc/consistent_function_names > This would be better fix for this issue. > Note: I added parameter issue handling to the RFC. However your proposal here (it's own merits aside), doesn't actually address what I mentioned. Since it still requires the use of a 'function first' phraseology instead of a more natural language one. If anything, it actually might hurt this one specific case. Because at least now, the function has a logical process to it, if you think about it. IE: in_array(what, array). Whereas switched as your proposal allows for: array_in(what, array). Means the function name is kinda backwards comparatively. Also, it reads as if it's something else. I'd expect by natural language, that array_in ... would look for an array in something. Not the other way around. Eli --=20 | Eli White | http://eliw.com/ | Twitter: EliW | --1J4smuoS86s0pVKfdC2ol35oeXRpKRmVq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUG14kACgkQUTBVzmoxCKKf9wCglTrUe264gbo+Wts8KOSZp0Wc GCAAn2BDFvPi9/4OKrAEd5gdo2Ue5kPQ =gviI -----END PGP SIGNATURE----- --1J4smuoS86s0pVKfdC2ol35oeXRpKRmVq--