Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34611 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30543 invoked by uid 1010); 8 Jan 2008 23:02:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30528 invoked from network); 8 Jan 2008 23:02:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2008 23:02:13 -0000 Authentication-Results: pb1.pair.com header.from=tomi@cumulo.fi; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=tomi@cumulo.fi; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cumulo.fi from 81.228.11.168 cause and error) X-PHP-List-Original-Sender: tomi@cumulo.fi X-Host-Fingerprint: 81.228.11.168 pne-smtpout4-sn1.fre.skanova.net Solaris 10 (beta) Received: from [81.228.11.168] ([81.228.11.168:37383] helo=pne-smtpout4-sn1.fre.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/2B-38195-4F004874 for ; Tue, 08 Jan 2008 18:02:13 -0500 Received: from [192.168.1.3] (84.250.46.16) by pne-smtpout4-sn1.fre.skanova.net (7.3.129) (authenticated as kaisto-9) id 474FD021001CFB0D for internals@lists.php.net; Wed, 9 Jan 2008 00:01:50 +0100 Organization: Cumulo Studio To: internals@lists.php.net Date: Wed, 9 Jan 2008 00:58:45 +0200 User-Agent: KMail/1.9.7 References: <200801081603.35826.tomi@cumulo.fi> <200801082247.51805.tomi@cumulo.fi> <1199827365.15292.289.camel@sbarrow-desktop> In-Reply-To: <1199827365.15292.289.camel@sbarrow-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200801090058.46018.tomi@cumulo.fi> Subject: Re: [PHP-DEV] type hinting From: tomi@cumulo.fi (Tomi Kaistila) > 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. Tomi Kaistila PHP Developer