Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44596 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29480 invoked from network); 1 Jul 2009 19:12:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2009 19:12:07 -0000 Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.227 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.219.227 mail-ew0-f227.google.com Received: from [209.85.219.227] ([209.85.219.227:47887] helo=mail-ew0-f227.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/78-24906-605BB4A4 for ; Wed, 01 Jul 2009 15:12:07 -0400 Received: by ewy27 with SMTP id 27so1259321ewy.23 for ; Wed, 01 Jul 2009 12:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=p6HVz2LDT+Kj8V0zlp4nArtezlCNi5+pGfMkqfwMfuo=; b=fd3/bPMffJhdSuSkAgJdE4Okms4i2Hf9vXYDY46pEDUsE8nbZ6vkP+R0gJbbnv/k/z ZDf9VifB4zDufJlBDNjye0C/9bvvD0niX/VxPBHyrpNnHaOBf1rYGO9r7o2MO53iERh7 yVJhkKEpuEA29RKHX1iW1mAlMdfFF38OlBy6I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=u5XwvV16NCeZzWjGQWCqUuWNe27RWS49mh8Yhv78uTT3FaaSKo97Ox1FES6OCBJY/S uScdyV9bRUNMqRhvkqhDLMBVaHQuCfeHpB1vzY1/y3WADU0L2Z9CkysR/bQnk6ee+3kO 12yfXbLiDQSD8l4CeHgbD9LDHsmk3a9dRgxf8= MIME-Version: 1.0 Received: by 10.210.89.7 with SMTP id m7mr5814319ebb.92.1246475523725; Wed, 01 Jul 2009 12:12:03 -0700 (PDT) In-Reply-To: <4A4BB330.8060104@zend.com> References: <4A4BA5C8.1020204@zend.com> <4A4BAE7B.3020601@zend.com> <4A4BB330.8060104@zend.com> Date: Wed, 1 Jul 2009 20:11:43 +0100 Message-ID: To: Stanislav Malyshev Cc: Ilia Alshanetsky , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3 From: paul.biggar@gmail.com (Paul Biggar) On Wed, Jul 1, 2009 at 8:04 PM, Stanislav Malyshev wrote: >> I agree. We won't be able to use an int type for something which >> should take an int. That might not matter in user code, but if we >> cannot actually type hint internals functions then its a problem. > > Internal functions have types, however parameters of different types are > usually converted, not rejected. Yes, rejection is bad. Coercion is good. (Silently accepting is bad). >> My feeling is that scalars should be automatically coerced to the >> correct type, if it makes sense to do so. (ie reject non-numeric > > That (coercion) is what internal functions do, but not what the proposed > patch does (except for "numeric" hint). Right. I think we're arguing on the same side. I'm just saying that if the manual says 'int', we should be able to use int, and not be required to use 'numeric'. Thanks, Paul -- Paul Biggar paul.biggar@gmail.com