Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92489 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26255 invoked from network); 19 Apr 2016 20:06:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2016 20:06:41 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.26 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.26 out2-smtp.messagingengine.com Received: from [66.111.4.26] ([66.111.4.26:50895] helo=out2-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/C6-22821-0DF86175 for ; Tue, 19 Apr 2016 16:06:41 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B36FE21756 for ; Tue, 19 Apr 2016 16:06:37 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Tue, 19 Apr 2016 16:06:37 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Fmq57ODM5dXvAi7 nbs7ksqXVL+I=; b=G5NEEBtPNeih5ezanQu4YApKh2s1wPpf9oqBSGI0jV0jBHd 4MbZr9wbe5uMdBj4brgdo/XglWce2Cx6nRbVaGuWaScT89FV46Rpg7HoEZPYaiH/ n2l8XP6eQdP1W8zgbB7dLaiRugDLrxSywBCicNUTTHWaLEou+uVs9ZWdWM8Y= X-Sasl-enc: rFOWtxPBUw1f5MM86kbwaA9BhH8wZvG7odo1GfKEpYb0 1461096397 Received: from Crells-MacBook-Pro.local (unknown [63.250.249.138]) by mail.messagingengine.com (Postfix) with ESMTPA id 4FBFEC0001A for ; Tue, 19 Apr 2016 16:06:37 -0400 (EDT) To: internals@lists.php.net References: <570E99AC.3090804@fleshgrinder.com> <570EA5EB.8090501@fleshgrinder.com> <570EAB0D.6080706@gmail.com> <570EB67E.8010908@garfieldtech.com> <5B147E88-CC0A-4CBC-A49D-C7FE3BF557C0@zend.com> <6F.C3.12455.94C5F075@pb1.pair.com> <20160414094440.GF19347@phcomp.co.uk> <570FD94F.90703@fleshgrinder.com> <570FE8A9.4020809@gmail.com> <20.53.29891.17401175@pb1.pair.com> <57110BCD.5030009@garfieldtech.com> <571124C2.9040606@gmx.de> <57112F31.8070209@garfieldtech.com> <57167C35.8080601@gmail.com> Message-ID: <57168FCC.7000507@garfieldtech.com> Date: Tue, 19 Apr 2016 15:06:36 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <57167C35.8080601@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: larry@garfieldtech.com (Larry Garfield) On 4/19/16 1:43 PM, Stanislav Malyshev wrote: > Hi! > >> Creating a generic feature that makes sense in a handful of >> situations, while at the same time being one that's >> waiting-to-be-abused in the vast majority of the rest (or as Tom put >> it, a 'footgun') is a pretty poor bargain IMHO. > Completely agree with Zeev here. > > It also seems to me that some measure of support for these features > comes from the "coolness factor" - look, ma, we have complex types, just > like those cool academic languages everybody is excited about! And I > don't deny the importance of language having some coolness factor and > getting people excited, but in this case I think it's a bit misplaced - > in *PHP*, I believe, most of the use for this feature would be to hide > lazy design and take shortcuts that should not be taken, instead of > developing robust and powerful type system. > > Now, PHP's origins are not exactly in "powerful type system" world, so > it's fine if some people feel not comfortable with this rigidity and > having to declare tons of interfaces, and so on. This is fine. But > inserting shortcuts in the system to make it "strict, but not strict" > seems wrong to me. Can we please, please drop the "you only want it because it's cool" strawman? A number of people are using it, and it's a flippant and insulting ad hominem attack; from everyone using it. It's the same thing as "PHP is not $other_language, therefore nothing from that language is useful for PHP." Which is an utterly wrong and useless argument to make. PHP's history has very clearly been one of borrowing and stealing ideas from every language we can find if they fit and make sense in PHP (and not if they don't). Referencing other languages to support the inclusion of a feature is not a coolness argument. It's a "solved problem, prior art exists" argument. If a need is identified within PHP for a given feature, it is both logical and expected to look for prior solutions to the same or similar problems. That's the whole point of OSS. That doesn't make the solution used by another language necessarily the right one, but it should be considered a viable candidate. Similarly, actual computer science (as opposed to the software engineering most of us do) is developing real and meaningful new solutions to problem spaces, which take years, often decades, to percolate down into production languages. That doesn't mean proposing a language feature informed by academia is just being hipster or elitist, it means learning from and benefiting from the work of others. That's the whole point of OSS. True, the onus is on the proposer of any new language feature to justify its inclusion. I completely agree with that. But rejecting a feature suggestion with "you're just trying to look cool" is unhelpful, unconstructive, and frankly harmful to the community and the language. Remember: 'Programming languages teach you not to want what they don't provide.' --https://twitter.com/compscifact/status/375283793923670016 That means PHP-centric developers are inherently inclined to not think a a feature PHP has right now is useful. It's an entirely natural and normal response to have. That doesn't make it right, or helpful. -- --Larry Garfield