Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81976 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93106 invoked from network); 5 Feb 2015 23:41:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 23:41:53 -0000 Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 74.125.82.170 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:36930] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/02-17766-FBFF3D45 for ; Thu, 05 Feb 2015 18:41:52 -0500 Received: by mail-we0-f170.google.com with SMTP id q59so1741023wes.1 for ; Thu, 05 Feb 2015 15:41:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=xY8P+2MZt9arX2MWmN8F4B40t3KhPdikAl83G+kgYLA=; b=dAiSpO8/UqTLEgUV4wi2PTTukLZ8RqzyhSUnMZ2m652I2ttwfbZ01AAvotGijzMowi LYA4FE1FZOo2lKjzx0X39emnEIFBiyUZ70ad9d9yRwcQb6Sp81lAk+8t2xGMW33uIs2L q87Fqh1EYUHNpGBlmF4Hsfuu6Rju+DiZ+xZjaYLh1OfeKBpNMO0Sd/m1uHXPeb8eynoi X1YYAEXbZpWx+5rfAXnjNMyT9gY9Q6ZLL7cuP9uOxbe2bIn+eeL/JEqAXsxY5e02gUx+ rbK/wKGiJgP1PSPXU97X5+zaeppxZXpBwK+Fi7fqHBtXYbQomKKQJmlSg9KH+WS8SNrk UJiQ== X-Gm-Message-State: ALoCoQlJd0sYBaXUmkS0+HKffsCiy7dyPWhLfQtEk7M+zJaBQ9KL4CRE+UVX+IdhmGQ3AW+exJ9o MIME-Version: 1.0 X-Received: by 10.194.60.205 with SMTP id j13mr1582937wjr.42.1423179708418; Thu, 05 Feb 2015 15:41:48 -0800 (PST) Received: by 10.217.82.208 with HTTP; Thu, 5 Feb 2015 15:41:48 -0800 (PST) X-Originating-IP: [78.149.8.112] In-Reply-To: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> References: <8703B53E-2C4A-4AC6-95C4-D4F19C6D5221@ajf.me> Date: Thu, 5 Feb 2015 23:41:48 +0000 Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints From: danack@basereality.com (Dan Ackroyd) As much as I want scalar types I'm voting no as: i) Having this code: function foo(int $numberOfRightTurns) { $x =3D $numberOfRightTurns * 90; return sin(deg2rad($x)) } work or blow up depending on a setting at the top of the file is horrible. ii) Having the code that I write in userland behave differently depending on how people call it, is also horrible. Additionally Andrea, I am disappointed that you opened voting without a option with the 'declare' stuff removed. This is despite myself having asked you for an vote option for just strict types directly several times. Other people have asked for a vote option that allows strict and weak types with a different syntax. I realise that the RFC as it stands is your preferred option, but just not accepting feedback during an RFC is not appropriate. I think it's clear that a lot of people want scalar types, so I hope that we can get the implementation right, but this RFC isn't it. cheers Dan On 5 February 2015 at 20:14, Andrea Faulds wrote: > Good evening, > > At long last, I=E2=80=99m going to put the RFC to a vote. It=E2=80=99s be= en long enough - I don=E2=80=99t think there needs to be, or will be, much = further discussion. > > I=E2=80=99d like to make sure that everyone voting understands the RFC fu= lly. Please read the RFC in full: the details are important. And if anyone= has any questions or uncertainties, please ask them before voting. I am ve= ry happy to answer them. > > I would urge everyone who wants type hints to vote for this RFC. It is no= t a perfect solution, but there can be no perfect solution to this issue. H= owever, I think it is better than most of the alternatives suggested thus f= ar - see the rationale section, and previous discussions. Crucially, this R= FC would keep PHP a weakly-typed language, and not force either strict typi= ng, nor weak typing, on anyone who does not want it. It would allow the add= ition of type hints to existing codebases. It would not create a situation = where userland functions are strict yet internal functions are not, because= the strict mode affects both. I=E2=80=99ve tested the implementation mysel= f on my own code, and it worked well, providing benefits other proposals wo= uld not have given (see my previous post about my experiences). > > Voting starts today (2015-02-05) and ends in two weeks=E2=80=99 time (201= 5-02-19). In addition to the vote on the main RFC, there is also a vote on = the type aliases issue, and a vote to reserve the type names for future RFC= s=E2=80=99 sake if this RFC fails. > > The RFC can be found here, and it contains a voting widget: https://wiki.= php.net/rfc/scalar_type_hints > > Thank you for your time. > > -- > Andrea Faulds > http://ajf.me/ > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >