Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37104 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51047 invoked from network); 17 Apr 2008 18:07:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 18:07:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.146.179 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: paul.biggar@gmail.com X-Host-Fingerprint: 209.85.146.179 wa-out-1112.google.com Received: from [209.85.146.179] ([209.85.146.179:7079] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/3F-05127-0E197084 for ; Thu, 17 Apr 2008 14:07:29 -0400 Received: by wa-out-1112.google.com with SMTP id l24so234742waf.17 for ; Thu, 17 Apr 2008 11:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=B3uISpaedbtPzVzyBSxdW4UQ8/2zCS2YgkvYJni6cu8=; b=DK1iBouHUvUgg2daHGl7zio+b33hrAVOLJp03lc30BIPuFY5Jxr6gdYSq5K5YBVb5MRnU/rxtibJUN+OfI8nAGSxmJ1mf8HSvc/8HA/IVrGWyvuwer9+oTVzpueMUyVGhsPZWSRnJutE0D7HwoXyQfM5FA0vvFzzuKQ218PM1yE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=vhonUpVF2JDpEXm9WtoOHYc/Th0AeuTj1StDL/YeOr1an+AYA8CekV4H7PbJ09ToNZR0/NyaoJZpHwx6QsZ14iJVRbKrPug3kgqDLRB/9RkKgUIQ3pMw9PWYKVVheJ4cl2x9G8dzEdvSmOV01t8IO9ANxTbRzxCfSKtabOujVCU= Received: by 10.115.88.1 with SMTP id q1mr1892155wal.98.1208455646043; Thu, 17 Apr 2008 11:07:26 -0700 (PDT) Received: by 10.114.255.17 with HTTP; Thu, 17 Apr 2008 11:07:25 -0700 (PDT) Message-ID: Date: Thu, 17 Apr 2008 20:07:25 +0200 To: "Stanislav Malyshev" Cc: "Chris Stockton" , "Felipe Pena" , internals@lists.php.net In-Reply-To: <48078FF9.7040304@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> <48077BD2.2000107@zend.com> <48078168.1070801@zend.com> <48078FF9.7040304@zend.com> Subject: Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value) From: paul.biggar@gmail.com ("Paul Biggar") Hi Stanislav, On Thu, Apr 17, 2008 at 7:59 PM, Stanislav Malyshev wrote: > As a final shock, I am not convinced > functions in PHP should throw exceptions when parameters don't match - and > even if they do, first they should attempt to make sense of parameters > (which makes string hints like "integer" and "string" make no sense - you > can convert a lot of things to int or string). This is of course why I suggested that the best approach would be automatically convert them, rather than reject a type which can be coerced appropriately. I would settle for the current proposal, but if you're going to make the language weakly-typed, which it is, it is more appropriate to keep this in line with the rest of the language. Paul -- Paul Biggar paul.biggar@gmail.com