Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80580 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56452 invoked from network); 15 Jan 2015 19:03:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 19:03:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=andi@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=andi@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 209.85.218.42 mail-oi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:41202] helo=mail-oi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B2/B0-49888-3FE08B45 for ; Thu, 15 Jan 2015 14:03:17 -0500 Received: by mail-oi0-f42.google.com with SMTP id g201so13840293oib.1 for ; Thu, 15 Jan 2015 11:03:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=BE++pG+xpOxRtouCS9daGnNEy5UUK5j5k0SQEZjMf1M=; b=PhKlmjHNjLwQexQfG1Tglkrszka0mAnA6DyK3kaHagtbcxX/+X4QU4qEf/k/aNGm+z FJ86app32OYvQK5Na64XF72r7WWuDxgd9qvTXqHDUQRAD5Slb9HDRnWo22VqjhMZElp5 FULWL04zDunufQPWkaEtYTzdNjSCSM7zZWs5H4jXVwzDpn6b/by6GY3gOrMYT2f6NFUm d2VfrP4WEbDPzlr9E8xlwxtLMYWivHq1OMgvDm9JMkzEmwJD74JWmB/N3uhhej7ZkImB EVwVP8mPAe2p902HBCS7bqTj6oyej4FTQpbiVdjBxKZkLePczEMbRCZiecsjMkk9bAyF WF5A== X-Gm-Message-State: ALoCoQnJbCtZdaOd8/ztg9CQqXBFHF8L/yDIyfow28/RCnPpCG1EDsvxs6erpo9Qhi8q1Vn0AdUwpdeZPm9UOwZmR7xaq/4b1Uhrjcvn/OIn+Mx/kR9W/hgFl1IrwpOqtVzgxwM2RPbnYNFyI/UXtd//HCxYdO9qDw== X-Received: by 10.202.218.138 with SMTP id r132mr6408699oig.107.1421348592447; Thu, 15 Jan 2015 11:03:12 -0800 (PST) Received: from [192.168.2.112] (107-137-69-239.lightspeed.sntcca.sbcglobal.net. [107.137.69.239]) by mx.google.com with ESMTPSA id dd17sm406869obb.18.2015.01.15.11.03.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Jan 2015 11:03:11 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <85F6139E-6332-4645-91B8-C852B07EA62A@ajf.me> Date: Thu, 15 Jan 2015 11:03:08 -0800 Cc: Zeev Suraski , RQuadling@gmail.com, Leigh , PHP Internals List X-Mao-Original-Outgoing-Id: 443041388.734772-33b74b1e2af4a0867f35febbfa7d01b5 Content-Transfer-Encoding: quoted-printable Message-ID: <12433808-9D62-48D3-B66E-74572C61BF68@zend.com> References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <4E2073DE-0951-498C-97BB-DDAC094F11FA@ajf.me> <9a033dd1f223f854e760924d118ab812@mail.gmail.com> <2ae0164cb9b9bf1c974d7a3c60af0466@mail.gmail.com> <6105ea99002e634373c09685310e26a6@mail.gmail.com> <85F6139E-6332-4645-91B8-C852B07EA62A@ajf.me> To: Andrea Faulds X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: andi@zend.com (Andi Gutmans) > On Jan 15, 2015, at 6:51 AM, Andrea Faulds wrote: >=20 >=20 > I=E2=80=99m not really sure this is true. I agree that strict types = aren=E2=80=99t entirely in keeping with the =E2=80=9CPHP way=E2=80=9D. = However, there are plenty of people who are against them not for that = reason, but simply because they don=E2=80=99t work well for them. Plus, = I=E2=80=99m not sure strict typing causes as much of a problem if it is = off by default. Nobody is forced to use it, the language would stay = beginner-friendly and weakly-typed. Indeed, strict type hints don=E2=80=99= t stop PHP being weakly-typed. They just check types at function call = boundaries. Think of it as a sanity check. >=20 >=20 > Let=E2=80=99s have a look. =46rom a quick skim over the thread for = v0.1: >=20 > * In favour of weak types (or the RFC anyway): Adam, Stas, yourself, = Jordi, Pierre, > * Against, in favour of strict types: Maxime, Nikita, Markus, Marco, = Leigh, Levi, Sven(?) > * In favour of strict types, not against weak types as compromise: = Matthew > * Somewhat in favour: Sebastian > * In favour of allowing both approaches: Marcio, Thomas, Marco >=20 > I apologise if I am misrepresenting anyone=E2=80=99s position. >=20 > This is unlikely to be super-representative of the PHP community. = However, I=E2=80=99m not sure I=E2=80=99d say =E2=80=9Coverwhelmingly = positive=E2=80=9D. It can be easy to get confirmation bias when reading = RFC threads. >=20 > It is very clear to me that a lot of people would like strict types, = and some people would like weak types. As to their relative numbers, I = cannot say. >=20 > I don=E2=80=99t think it=E2=80=99s really fair to cover only the use = case of one half of the PHP community. The other half counts too. This = is a rather divisive issue. Man, oh man. I thought we finally had a proposal with 0.1 that everyone = could give a thumbs up to and move forward. One that enables stronger = type stability (for those who want it) and even can allow for = under-the-hood optimizations. I really think we took a step back with 0.2. I think a super strict = approach is really against what PHP is about. And a configuration option that significantly impacts how the language = behaves is probably the worst thing we could do. I remember I bumped = into something like that with Visual Basic and expression short = circuiting (yes the first version didn=E2=80=99t have that and it became = a configuration option). Completely horrible and unmaintainable. We cannot have a configuration option that changes the core language = behavior. That is a no-no and there=E2=80=99s a good reason why = languages stay away from that. And definitely disappointed that we took a step back after it seemed we = could finally come to an agreement on this agonizing topic. Andi=