Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34388 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28869 invoked by uid 1010); 4 Jan 2008 02:35:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 28853 invoked from network); 4 Jan 2008 02:35:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 02:35:24 -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:43975] helo=scottsdale.servershost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/EB-20810-B6B9D774 for ; Thu, 03 Jan 2008 21:35:23 -0500 Received: from [208.58.196.175] (port=50132 helo=[192.168.1.92]) by scottsdale.servershost.net with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1JAcP6-0002Ja-HW; Thu, 03 Jan 2008 20:35:24 -0600 To: Steph Cc: internals@lists.php.net In-Reply-To: <009601c84e75$c3407260$0202a8c0@foxbox> References: <200801031903.01980.tomi@cumulo.fi> <1199380881.15292.11.camel@sbarrow-desktop> <20080103172813.GQ7861@mint.phcomp.co.uk> <477D2B40.9010302@fischer.name> <477D2CDB.3000005@zend.com> <477D452A.9090906@zend.com> <1199392531.15292.64.camel@sbarrow-desktop> <477D4ACF.3030006@zend.com> <477D503E.1040701@iamjochem.com> <1199396530.15292.81.camel@sbarrow-desktop> <006d01c84e74$09fd7ec0$0202a8c0@foxbox> <1199411667.14764.0.camel@e-vectra> <009601c84e75$c3407260$0202a8c0@foxbox> Content-Type: text/plain Date: Thu, 03 Jan 2008 21:35:18 -0500 Message-ID: <1199414118.14764.21.camel@e-vectra> 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] RE: Optional scalar type hinting From: sam@sambarrow.com (Sam Barrow) On Fri, 2008-01-04 at 02:01 +0000, Steph wrote: > > I'm just a php developer who didn't agree with the rules on type > > hinting. > > ... or superglobals, or multiple class inheritance rules. Why PHP? What did > we do? :\ > > More seriously (because I don't think this has a hope in hell of getting in, > for all the reasons Stas is trying to explain) - I'm bothered because I idly > went to check you out when you first turned up and couldn't find any record > of your existence prior to your appearance on internals@. Even the site > name's booked by proxy. Are you the Brackets man? > I just like PHP enough that rather than switch languages, I would like to attempt to make PHP better. I've only been working with the PHP source since November and I'm 19 so I haven't been around for many prior contributions to PHP; that's probably why you haven't heard of me. I started messing with the source and about a week later I had the type hinting and superglobal patches done, and I joined internals. I completely understand the disadvantages to multiple inheritance so I've kind of dropped that, I support custom superglobals but I can understand why they are unwanted, but scalar type hinting I think should be in PHP. I have written all 3 of these patches but this is the one I'm pushing for mostly. I'm using the superglobal patch for my own development, and I have multiple inheritance working, but I don't want to have to rewrite the patch every time php changes. And these reasons you're talking about that Stas brought up, I don't see any reasons besides the fact that it may confuse newcomers and it's too "javaish". Performance is not an issue here, especially for those who don't use type hinting. For those who don't want to use it they don't have to because it's optional. Any other arguments can be countered by the fact that if type hinting is not proper in the situation, don't use it. If you want to, then use it. Everybody wins. Plus the majority on here seems to agree with me. Type hinting is already in PHP. It's been in PHP. Why not add a couple of useful types? I don't see any debate here.