Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34416 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23509 invoked by uid 1010); 4 Jan 2008 17:09:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23494 invoked from network); 4 Jan 2008 17:09:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 17:09:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.186 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.186 rv-out-0910.google.com Received: from [209.85.198.186] ([209.85.198.186:40244] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/2A-63281-2386E774 for ; Fri, 04 Jan 2008 12:09:06 -0500 Received: by rv-out-0910.google.com with SMTP id k15so5088569rvb.23 for ; Fri, 04 Jan 2008 09:09:02 -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=NN8Y/AOG93IdcOBRP0kQdwomPhTqJwQHVMf8VND8894=; b=E2Ia45Vja+VLpgmOcXEokutsoYjthFgfj4T8g8Ew/wryH3oCcO78nDXCOrzv0rC9WzpqN1iV3AmN8D2rupaHuQYThIQMZVkc3skJyVEUCwC0I54N5MGn8b1lcUPBsaDFrkxjpNxvaFqXuWrrfYizHiF8fyE3sPvCEPC+X72i3XQ= 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=L3zeZ4DzoU5F1ZmAz299dZK+R7tV/5TY3VJr2WI1wDbc7yAtwDmusr7v7/+8GZAmvNxuzmE18bgd7F/H+cueiKJXUqKUzyV6uuSwKupNcDvVaQuupuxqgNhh6Tt0c8weArNDqS7aDFxsn+qaThximATKTOMltQ90d99/jjhpfu4= Received: by 10.141.172.6 with SMTP id z6mr4834086rvo.136.1199466542410; Fri, 04 Jan 2008 09:09:02 -0800 (PST) Received: by 10.141.177.21 with HTTP; Fri, 4 Jan 2008 09:09:02 -0800 (PST) Message-ID: Date: Fri, 4 Jan 2008 18:09:02 +0100 To: "Sam Barrow" Cc: "Gregory Beaver" , "Alain Williams" , "internals Mailing List" In-Reply-To: <1199466070.15292.140.camel@sbarrow-desktop> 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> <1199466070.15292.140.camel@sbarrow-desktop> Subject: Re: [PHP-DEV] type hinting From: pierre.php@gmail.com (Pierre) On Jan 4, 2008 6:01 PM, Sam Barrow wrote: > > On Fri, 2008-01-04 at 17:53 +0100, Pierre wrote: > > On Jan 4, 2008 5:53 PM, Pierre wrote: > > > 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 > > > > Read: othing will prevent you to >do not< use it :) > > > > So you're saying if you don't like it just don't use it? Yes, that's the meaning of "optional" I suppose :) My idea about it (I did not test the patch, so correct me if I misunderstood the proposal) was to leave the default as it is now: function($a) > what Greg likes to always use ;) function(mixed $a) > little syntax sugar, same as the previous one function(int $a) etc. -- Pierre http://blog.thepimp.net | http://www.libgd.org