Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99400 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6322 invoked from network); 6 Jun 2017 12:57:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2017 12:57:19 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wm0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:35284] helo=mail-wm0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/1F-27119-DA6A6395 for ; Tue, 06 Jun 2017 08:57:19 -0400 Received: by mail-wm0-f49.google.com with SMTP id x70so36496990wme.0 for ; Tue, 06 Jun 2017 05:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=FT/u8AcCJ4JDnfSH0/r2p0N19kLtBOhA48R3nWY0i1Q=; b=lkFo+aZDCBzl+oKpT4SQtJ35ldEy+qCmnt8yGEaUXIbyRerl99RlzSHdOJWD+9yNcg VII5HA5owOoPkqb8AckBIfUxE63feosVjJAqEjkne4Usx/hOUeZCI81XthbvmNybDM5E DadK7qjKN2PKXs1g26lQi4o05oJh8koYAVCyZQpKWYRxvi9dyI7NoaCtdTbNJxMNZHgM Q+xdIcmd1iz8mwilB50Zk7PA9edQemZJTxt9veiiNuxNhtXvBrGQh0VT+NKHr7n0fC9r vn0HqWVqmGof9l7t/mHGipPiBXgIo7CZb5uTW0EOc6xOPMGxevKrd5Si4lbLTWuErFy8 gtOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=FT/u8AcCJ4JDnfSH0/r2p0N19kLtBOhA48R3nWY0i1Q=; b=dUwh3rUqk/Sa1wnT04vZKsuDZn6CmE7I0Hk3nBb4HPNZ+d7TLFtXvOVP+UJRt6M4Yl NENFmzsCL52XsgihsNU/GOMSNmE55Ss4cKZnSJDsvNCrNq0D96KXC+p5HRR5DIs9nEgY B6hrIYamV4nV4fUyZKjGQWvJsV9QEc3YYL6xDABr5e1jfA1vgkIooyKLOdNN6XkroNg1 Eg0VNYVyRAu13gM8IA0XrVh9niSuCEZO56etXJX0x6rUZCkF2VDsevog5WSUzu1CugjG LLBvTQytpOhUZ77Hizb66OUEocAT0AVk4PRzpt3sgFotTNwy1/sylazfiPaW3UgwIfAz mxzA== X-Gm-Message-State: AODbwcDV3yQa50lrZVGpWaiYXNUHyXaqbW0J91PmNW/m2D9Ex7NrE4dI DDmhDweI7HdSTCIKdP8= X-Received: by 10.28.23.9 with SMTP id 9mr11243287wmx.108.1496753834624; Tue, 06 Jun 2017 05:57:14 -0700 (PDT) Received: from [10.93.221.227] (94.197.120.240.threembb.co.uk. [94.197.120.240]) by smtp.gmail.com with ESMTPSA id r10sm14827850wmd.9.2017.06.06.05.57.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 05:57:13 -0700 (PDT) Date: Tue, 06 Jun 2017 13:57:10 +0100 User-Agent: K-9 Mail for Android In-Reply-To: <10.6B.27119.02566395@pb1.pair.com> References: <9dffe898-e550-c6d6-46bd-86dcf74735ea@fleshgrinder.com> <3cfc0130-e530-64ed-36e8-372b044811a8@rhsoft.net> <03.F6.12681.AF215395@pb1.pair.com> <3351770B-C53E-4062-A91A-D3AA7439F02B@gmail.com> <10.6B.27119.02566395@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: internals@lists.php.net,Tony Marston Message-ID: <661DCFAE-C27B-49D6-80CD-5E69579B0897@gmail.com> Subject: Re: [PHP-DEV] Class Naming in Core From: rowan.collins@gmail.com (Rowan Collins) On 6 June 2017 09:17:31 BST, Tony Marston wrote= : >"Rowan Collins" wrote in message=20 >news:3351770B-C53E-4062-A91A-D3AA7439F02B@gmail=2Ecom=2E=2E=2E >> >>On 5 June 2017 09:14:47 BST, Tony Marston >wrote: >>>Seriously, can you explain in words of one syllable the precise >>>benefits of >>>such a consistency? >> >>I will try: >> >>- When we write code, we need to know how to spell the names of >things=2E If=20 >>the things all have names that look the same, it is less hard for us >to=20 >>guess what the name is=2E This means we take less time to learn the >names,=20 >>and get less things wrong=2E > >Words and abbreviations are spelled the same whether you use snake_case >or=20 >CamelCase, the only difference is how you show the boundary between one >word=20 >and the next=2E Studies have shown that snake_case is more readable than= =20 >CamelCase=2E > >>- Our brains are made to spot when things are the same, and when >things are=20 >>not the same=2E When one thing is not like the things near it, we think >"why=20 >>is that?" This slows us down=2E > >Seeing a name written in snake_case does not slow you down=2E In normal= =20 >writing there is a space between each word, but as names in software >cannot=20 >have embedded spaces=2E This is why underscores are used, and this is=20 >infinitely more readable than replacing spaces with a capital letter=2E > >>- When we get things wrong, we need to find out what we did wrong=2E If >one=20 >>way to write a name is wrong, we can spot when we wrote it that way, >and=20 >>know that it is wrong=2E > >Writing a name wrong has nothing to do with the difference between=20 >snake_case and CamelCase=2E My IDE will show me existing names that match >what=20 >I am typing as soon as I start typing, so I can easily pick the name >that I=20 >want=2E > >>- If we make two things that mean the same thing, but do not look the >same,=20 >>we might not spot that we wrote a third thing that does not mean the >same=20 >>thing=2E > >If you try to instantiate a class that does not exist, or call a=20 >method/function which does not exist, then you will soon know about it=2E > >Using snake_case instead of CamelCase does not invite more errors=2E > >>I think there are more things that make it good to have names that >look the=20 >>same, but I hope this helps for now=2E > >The only universally accepted "rule" for names is that they be unique >and=20 >convey proper meaning=2E In proper languages all names are >case-insensitive as=20 >the ability to write the same name with the exact same spelling but=20 >different case is simply inviting disaster=2E Hi Tony, I think it's clear at this point that we're never going to agree here=2E W= e don't seem to even agree what the topic of discussion is - consistency in= general? CamelCase in general? Richard's RFC? the authority to choose thin= gs? etc More importantly, we're not going to change the minds of the people who wi= ll actually make this decision by filling the list up with our debates=2E W= e're just wasting our own time and everyone else's, so I'm going to stop he= re=2E Regards, --=20 Rowan Collins [IMSoP]