Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80562 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9288 invoked from network); 15 Jan 2015 16:04:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 16:04:19 -0000 Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 74.125.82.175 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 74.125.82.175 mail-we0-f175.google.com Received: from [74.125.82.175] ([74.125.82.175:41191] helo=mail-we0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5C/A0-14306-AF4E7B45 for ; Thu, 15 Jan 2015 11:04:15 -0500 Received: by mail-we0-f175.google.com with SMTP id k11so15535731wes.6 for ; Thu, 15 Jan 2015 08:04:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=S1T2Ac/wTAuc0wT+C2YLuA9d184WcgxTWdPNxRyESj4=; b=GWItnobDk/hS39ow8cVe9UX+7k5GgD6l+4OPJiWzepoLFijkc4HmCtnZJfmOQrzn7C iSx9lnVyGRZOhItPxD2H1jf+G7uw9zV+2UmJqNPuRMCjY/phCwQETap+rhSD5KcqLgGk SO0FhnuXQ+Yqt07uT9AtJ0kUmpOcAjhRH9pU4yroS99SNvBcmGvnA1HpC3tOlQAbtrst NBGGOqd1H1dvfk9vg/kvkmzErqnAaKCLh6VCPMb8EWMkQoCEfHLaLOh9D39fIgYbib6m ImVQJHPavA9m44IFOhG6oOP9hBkgldI1ISidD/FaP3z4d1EE5RVRpn3fCoDy0n8eXEks Iizg== X-Gm-Message-State: ALoCoQlDpvgmStl3q4RUgH5tYsS+ZGyxAmPKWEQgUScaiEpiRjs38m6rmkSC44uOkJiC4lgMGpvG X-Received: by 10.194.24.195 with SMTP id w3mr18704808wjf.135.1421337843452; Thu, 15 Jan 2015 08:04:03 -0800 (PST) Received: from [192.168.1.66] (83.90.199.146.dyn.plus.net. [146.199.90.83]) by mx.google.com with ESMTPSA id dp8sm23284869wib.20.2015.01.15.08.04.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 08:04:02 -0800 (PST) Message-ID: <54B7E502.8080605@seld.be> Date: Thu, 15 Jan 2015 16:04:18 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: =?UTF-8?B?UGF2ZWwgS291xZlpbA==?= CC: PHP internals 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> <54B7DA71.1050905@seld.be> <54B7DE53.4070806@seld.be> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: j.boggiano@seld.be (Jordi Boggiano) On 15/01/2015 16:01, Pavel KouĊ™il wrote: > On Thu, Jan 15, 2015 at 4:35 PM, Jordi Boggiano wrote: >> >> I mean that if someone wants strict typing they won't want to use weak hints >> because that would coerce the data before they can verify it and ensure >> their code is strictly typed. >> >> Therefore the best course of action is to have no hint + check manually, >> like they are doing now with such libs. >> > > I'm sorry, but I still don't follow. > > For the writer of a library, he is always guaranteed to get the types > he wants (declared in typehints) and therefore checking inside the > method doesn't really make any sense. Or are you saying that > developers would use checks inside of methods instead of typehints, > even if the RFC passed in its current state with the declare() > statement? No I am saying if it passes *without* declare then people wishing to use strict types would have to build their own typing, effectively removing the choice from these library's users as to whether they want strict hints or not. It's just an argument in favor of having declare(). Cheers -- Jordi Boggiano @seldaek - http://nelm.io/jordi