Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34588 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86356 invoked by uid 1010); 7 Jan 2008 18:16:35 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86340 invoked from network); 7 Jan 2008 18:16:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jan 2008 18:16:35 -0000 X-Host-Fingerprint: 24.247.219.180 24-247-219-180.dhcp.cdwr.mi.charter.com Received: from [24.247.219.180] ([24.247.219.180:27598] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/37-15135-28C62874 for ; Mon, 07 Jan 2008 13:16:35 -0500 Message-ID: <2E.37.15135.28C62874@pb1.pair.com> To: internals@lists.php.net Date: Mon, 07 Jan 2008 13:16:42 -0500 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 References: <477DB7BF.10201@chiaraquartet.net> In-Reply-To: <477DB7BF.10201@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 24.247.219.180 Subject: Re: type hinting From: auroraeosrose@gmail.com (Elizabeth M Smith) Afternoon, Wow, go away for a weekend and look what happens... Personally I think the issue is that true "scalar" type hinting doesn't make much sense with a dynamically typed language. Deciding if/when/how to juggle a scalar typehint is going to make at least one person angry and some new user confused. However, I have to agree with the fact that the current typehinting system feels "unfinished". I can tell a function that it has to be passed an array or some specific type of object, but can't tell it that it has to be passed a scalar type, or a resource, or any generic object. These don't "juggle" well like the generic scalar (int, bool, float, string) types. Is there any reason we can't at least add "scalar" and "resource" (and possibly "object" for generic objects) to typehints? It wouldn't be the full "scalar typehinting" solution that people are yelling for, but it would cut out lines of bad input handling in my own code, and make the current typehint solution feel more complete. My own $0.02, Elizabeth Smith