Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92607 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8666 invoked from network); 21 Apr 2016 20:39:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Apr 2016 20:39:07 -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:56302] helo=out2-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/A5-14036-B6A39175 for ; Thu, 21 Apr 2016 16:39:07 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 105C620CFF for ; Thu, 21 Apr 2016 16:39:05 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Thu, 21 Apr 2016 16:39:05 -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=pqkEx1KEJuCSUuw sj7ujXgy6cmQ=; b=fCBJ1S9RwkS3VkQsoiL8+bLauVaWaCttSof4FBMtVIodIaT 3J3wNMCISEbS5Q5DIhcouKTa3p4hSDeYFBpy2ZjO3Z3YyQxnA0Li5hlyNYs2+XcC 7JWiAh+lensm1eP3AjtIqmx/+w/j5e0rYIzx0rp0GpzLFk/q6rsep4nafh2o= X-Sasl-enc: FxVXyz44EHfrnQLnSjon8deeDZ5w1J5vw6sATRJmU+bZ 1461271144 Received: from Crells-MacBook-Pro.local (unknown [63.250.249.138]) by mail.messagingengine.com (Postfix) with ESMTPA id C4F6B68022D for ; Thu, 21 Apr 2016 16:39:04 -0400 (EDT) To: internals@lists.php.net References: <5717D70E.5010706@lsces.co.uk> <5717E02C.9030505@gmail.com> <5717EEBD.80303@gmail.com> <571925D6.40605@fleshgrinder.com> Message-ID: <57193A68.4080301@garfieldtech.com> Date: Thu, 21 Apr 2016 15:39:04 -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: <571925D6.40605@fleshgrinder.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Quick sanity check ... From: larry@garfieldtech.com (Larry Garfield) On 4/21/16 2:11 PM, Fleshgrinder wrote: > > What I love about PHP is that we have a lot under one hood: > multi-paradigm as well as loose and strict types. This allows one to > choose the best tool for the current job. ^^ That thing. PHP is a very eclectic language. That's a good thing. Does that mean there's a lot to know? To an extent, yes. But frankly, I still find needle/haystack more confusing than any of the new features from the "PHP 6" era (PHP 5.3-5.6) or PHP 7. And things that Zeev is (rightly) encouraging like async primitives would likely be far more confusing for current PHP developers than being able to say "this parameter has to implement both of these interfaces". No one is arguing that typing is a replacement for testing. However, typing is a form of logical proof. Logical proof is a way of demonstrating the absence of bugs, albeit an incomplete one. Testing is a way of demonstrating the absence of bugs, albeit an incomplete one. Testing establishes an upper bound on bugs, while proof/typing establishes a lower-bound. Having robust options for both available lets developers pick one, the other, or both as appropriate for their project. Does that mean "PHP is broken?" No, that's an absurd strawman. Does being against union types or scalar types or property types mean "PHP is perfect?" No, that's also an absurd strawman. But there are unquestionably cases where robust typing is helpful. We should allow that, and encourage the development of more robust typing for those cases where it is helpful. But completely untyped PHP is still 100% legal today and no one on this list is suggesting removing it. Typing in PHP doesn't have to be a strict either/or. That's what's so great about PHP's emerging type system: Typed and untyped code can coexist reasonably peacefully. Can typed and untyped supporters do the same? I hope so... -- --Larry Garfield