Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80561 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5529 invoked from network); 15 Jan 2015 16:01:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2015 16:01:47 -0000 Authentication-Results: pb1.pair.com header.from=pajousek@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pajousek@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.179 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.216.179 mail-qc0-f179.google.com Received: from [209.85.216.179] ([209.85.216.179:57723] helo=mail-qc0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/DF-14306-A64E7B45 for ; Thu, 15 Jan 2015 11:01:46 -0500 Received: by mail-qc0-f179.google.com with SMTP id c9so12756932qcz.10 for ; Thu, 15 Jan 2015 08:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=B4SJdOZvmDRSJ6X84v5clv6Fi1eCCRow50W0cL3TTdE=; b=zdlBaeoFDTIPfEIFEsY7OlQNxJZaipqI16mu5NqIuG1HyaDOiZZzdIcOJXDB0s9nJE FFvYqA5IIofpRv8h6TnIKPBmz2ZddBhGt+M7RgA39t+5hzeHP1Gtrv87K2fbM7ptop7D INUoKwOpYY63pYDr4bRrJhfSjwb4C6XhZg/kNc+5AdPmBpM/RgEXJhIvsxhq+3HS9t5O D6vxWfB32qzNaM7IfZJ7YMhG5eyVw/ZF9gG7X5imuIMw3rdK7PX5wzcThRvGBMNFKeQO U566iD+cdfdC8bIWNF2K7mihSrwcGTgfAkOgNTYAXKmZk/fNVExwaYELTTLDI/laZUL1 l9Zw== MIME-Version: 1.0 X-Received: by 10.224.12.19 with SMTP id v19mr16676915qav.22.1421337703717; Thu, 15 Jan 2015 08:01:43 -0800 (PST) Received: by 10.96.55.138 with HTTP; Thu, 15 Jan 2015 08:01:43 -0800 (PST) In-Reply-To: <54B7DE53.4070806@seld.be> 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> Date: Thu, 15 Jan 2015 17:01:43 +0100 Message-ID: To: Jordi Boggiano Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) 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? -- Pavel Kouril