Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34411 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9164 invoked by uid 1010); 4 Jan 2008 16:53:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9143 invoked from network); 4 Jan 2008 16:53:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 16:53:18 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.185 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.198.185 rv-out-0910.google.com Received: from [209.85.198.185] ([209.85.198.185:10957] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/57-63281-9746E774 for ; Fri, 04 Jan 2008 11:53:15 -0500 Received: by rv-out-0910.google.com with SMTP id k15so5084669rvb.23 for ; Fri, 04 Jan 2008 08:53:07 -0800 (PST) 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=KDHGZ1TAzlr0Ih3tEh/CD4K7s3EwtWKbFzTRjLmCeys=; b=bXsLCCzZsWDls70K1XgcT3+Y92N1vCGZNkGduvqUTOALCx3uJZY/W4cKobItbN52ZMuBBBAJgziQ4HFOclxZ2irVToahunrG+7CIEBmwpGhcam4iKy04ykA2I9f1jODMfhQSANal7On5NTil1XqzbYyuQBlvVDqJ0YmG4KXz1j4= 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=WB87gsjM9GAA46ti3lRQ5F7LGvVGi+LWre2gaeJfuB0mLqWzy0fPurkb/m+5FkUko0Ic1pwoNPFAZZ19+HE0MiJk/9RuXFTLLYQF7UgHFz/cQLzIsP3oPw+obQuNvJe7b/uqMLcwR1ZpFHtbkAFy9k/je9UV71YKt6+mQ0FPz8Q= Received: by 10.141.136.19 with SMTP id o19mr7265172rvn.250.1199465587307; Fri, 04 Jan 2008 08:53:07 -0800 (PST) Received: by 10.141.177.21 with HTTP; Fri, 4 Jan 2008 08:53:07 -0800 (PST) Message-ID: Date: Fri, 4 Jan 2008 17:53:07 +0100 To: "Gregory Beaver" Cc: "Alain Williams" , "internals Mailing List" In-Reply-To: <477E5649.2080104@chiaraquartet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <477DB7BF.10201@chiaraquartet.net> <20080104105558.GC7861@mint.phcomp.co.uk> <477E5649.2080104@chiaraquartet.net> Subject: Re: [PHP-DEV] type hinting From: pierre.php@gmail.com (Pierre) On Jan 4, 2008 4:52 PM, Gregory Beaver wrote: > But I *don't* want my functions to take an argument of arbitrary type - > it is in fact you who are missing the point. A type hint is a poor > solution to a real problem that is much more easily solved via simple > input validation and graceful error handling. The current situation in > PHP provides a much more flexible solution to the same problem. Unlike our OO strictness (E_FATAL!!), nothing will prevent you to use it. You still like to take care of any kind of types for your arguments (with all associated magical pains and useless tests), you can do it. That's not the case for use who likes to use stronger arguments (and we are talking about arguments only here). Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org