Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34612 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26493 invoked by uid 1010); 9 Jan 2008 12:49:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26478 invoked from network); 9 Jan 2008 12:49:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2008 12:49:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 205.234.132.11 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 205.234.132.11 scottsdale.servershost.net Received: from [205.234.132.11] ([205.234.132.11:60831] helo=scottsdale.servershost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 88/D8-64645-3C2C4874 for ; Wed, 09 Jan 2008 07:49:09 -0500 Received: from [98.172.154.66] (port=39287 helo=[10.200.100.14]) by scottsdale.servershost.net with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1JCaMq-0006zu-5w; Wed, 09 Jan 2008 06:49:13 -0600 To: Tomi Kaistila Cc: internals@lists.php.net In-Reply-To: <200801090058.46018.tomi@cumulo.fi> References: <200801081603.35826.tomi@cumulo.fi> <200801082247.51805.tomi@cumulo.fi> <1199827365.15292.289.camel@sbarrow-desktop> <200801090058.46018.tomi@cumulo.fi> Content-Type: text/plain Date: Wed, 09 Jan 2008 07:46:53 -0500 Message-ID: <1199882813.15292.303.camel@sbarrow-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - scottsdale.servershost.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sambarrow.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] type hinting From: sam@sambarrow.com (Sam Barrow) On Wed, 2008-01-09 at 00:58 +0200, Tomi Kaistila wrote: > > Ok, but a scalar becomes useful for a couple of important things. > > Scalars are all displayable values, that can be stored in a db, > > outputted, etc. The scalar type hint prevents errors related to objects, > > resources, and arrays attempting to be stored in the db or echoed. > True, but honestly I do not see a whole lot of use for this. In a word, it is > very limited. _Too_ limited to be truly useful in my opinion. It is simple > statistics; there is more need for specific types than scalars in general, > when using type hinting. > > I do agree that it is a good idea to allow for type hinting scalars in > general, but it should not be considered a solution. It is more like a > comfortable add-on. > > And to be frank, this really feels like a secondary price (bronze at most). If > pressed I would go bold say that this really feels like a screw. A way of > saying that we went out of our way to fix this feature that was limited by > adding a seemingly useful attribute to it, but in the end still leaving the > feature limited and not really fixing anything. A useful addon is better than none though, regardless. I agree this is not a full solution, but I'd rather have 3 type hints than 2. > Tomi Kaistila > PHP Developer >