Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68022 invoked from network); 17 Apr 2008 15:54:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 15:54:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=chrisstocktonaz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chrisstocktonaz@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.200.172 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: chrisstocktonaz@gmail.com X-Host-Fingerprint: 209.85.200.172 wf-out-1314.google.com Received: from [209.85.200.172] ([209.85.200.172:6694] helo=wf-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/4D-05127-FC277084 for ; Thu, 17 Apr 2008 11:54:56 -0400 Received: by wf-out-1314.google.com with SMTP id 27so85478wfd.26 for ; Thu, 17 Apr 2008 08:54:53 -0700 (PDT) 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:in-reply-to:mime-version:content-type:references; bh=xMvLnL5JLWdklRL3t1oJzOcbohMeOoCzTZwbV8LE5Rc=; b=xkPjBrSi500UUjcFfWYzssWuq9JmaZpqy1rvVNV0+YbxqURt9CI2c6en6BUtCjDj5tMJrSoP8zMKWBL/AyrPhCvYPrcWpCP70VcSGrusP9qd5VzWhE0yNF5Toq+Bh+2zsogYTymHdPq2ZSL3tG2GDrXV72Bb0iwPCQpGB9DiHR0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=xCCSpQwFKFZksNt9CqrzwR6by4n9NsYG1IcaA47NjdMYkwBaWR/s5+QxV/vUGVGXIdqcjcFnb8SKiy4pp5Rc5lB6885Qp3J2apuql8Vi1c6K3JPyyC+ZJcXf1JuhBdfAxUciBpvv5D9jjIfkq69N+7edhnjOstujeMVdXEIYH3w= Received: by 10.142.237.20 with SMTP id k20mr494150wfh.112.1208447693428; Thu, 17 Apr 2008 08:54:53 -0700 (PDT) Received: by 10.142.178.15 with HTTP; Thu, 17 Apr 2008 08:54:53 -0700 (PDT) Message-ID: Date: Thu, 17 Apr 2008 08:54:53 -0700 To: internals@lists.php.net In-Reply-To: <48076FB3.1040303@cschneid.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_435_25603139.1208447693412" References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> <48076FB3.1040303@cschneid.com> Subject: Re: [PHP-DEV] Re: [RFC] Strict type hints (parameter and return value) From: chrisstocktonaz@gmail.com ("Chris Stockton") ------=_Part_435_25603139.1208447693412 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I like this patch, it adds a feature which a lot of companies and code base would surely implement without breaking anything. The only thing I do not like has already been mentioned, numeric and scalar are not included. The one thing I don't dislike, but am unsure of the ease to understand by users is the return type hinting syntax, using type casting. Maybe I am wrong but do you think users might get confused by it since it already has an existing purpose of transforming values to other types, maybe they will think at glance it transforms the return type to something else? Of course it would be fault of there own for not reading, but is it NATURAL to use the existing type hints for it? Why not: function int foo($foo) { } I understand the problem with adding the INT as a keyword, and how that maybe: function int int($foo) { } is awkward, but would be rare and seems to be more correct. I know it would be more difficult to implement the latter but it should not be impossible should it? Just throwing it out there, it is a nice patch and a nice feature for A LOT of people even though it is not exactly the php way, but all things must evolve. -Chris ------=_Part_435_25603139.1208447693412--