Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34389 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31802 invoked by uid 1010); 4 Jan 2008 02:55:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 31786 invoked from network); 4 Jan 2008 02:55:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 02:55:29 -0000 Authentication-Results: pb1.pair.com header.from=steph.fox@virgin.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=steph.fox@virgin.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain virgin.net from 64.97.136.146 cause and error) X-PHP-List-Original-Sender: steph.fox@virgin.net X-Host-Fingerprint: 64.97.136.146 smtpout0146.sc1.he.tucows.com Solaris 8 (1) Received: from [64.97.136.146] ([64.97.136.146:22121] helo=n064.sc1.he.tucows.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/5C-20810-F10AD774 for ; Thu, 03 Jan 2008 21:55:28 -0500 Received: from sc1-out03.emaildefenseservice.com (64.97.139.2) by n064.sc1.he.tucows.com (7.2.069.1) id 476977050038F9CC; Fri, 4 Jan 2008 02:55:20 +0000 X-SpamScore: 2 X-Spamcatcher-Summary: 2,0,0,775193f2dda9753b,8406d82750572448,steph.fox@virgin.net,-,RULES_HIT:355:379:539:540:541:542:543:567:599:601:945:973:980:988:989:1155:1156:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1535:1543:1587:1593:1594:1605:1683:1711:1730:1747:1766:1792:2073:2075:2078:2198:2199:2377:2379:2393:2553:2559:2562:2692:2693:3027:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:4117:4250:5007:6119:6226:6261,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none, DomainCache:0,MSF:not bulk,SPF:,MSBL:none,DNSBL:none X-Spamcatcher-Explanation: Received: from foxbox (unknown [64.97.206.40]) (Authenticated sender: steph.fox) by sc1-out03.emaildefenseservice.com (Postfix) with ESMTP; Fri, 4 Jan 2008 02:55:19 +0000 (UTC) Message-ID: <00bc01c84e7d$595d62b0$0202a8c0@foxbox> Reply-To: "Steph" To: "Sam Barrow" Cc: 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> <1199414118.14764.21.camel@e-vectra> Date: Fri, 4 Jan 2008 02:56:03 -0000 Organization: private mail MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: steph.fox@virgin.net ("Steph") > 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 Right, that'd explain it. It's just that usually people do a bit of PHP development (websites, applications, whatever) or throw out a couple of classes, or _something_ that Google can find anyways, before they start telling the core PHP dev team they're doing it all wrong. 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. No, you subscribed to the internals mailing list. > 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. So far, fair enough. > 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". 'It may confuse newcomers' is a big issue in PHP. Ease of takeup is the mainspring of the language's design. The other point Stas made that you appear to have missed is that loose typing is very much a PHP feature. It's one of the things that helps make the language easy for newcomers, and it also means the language is more forgiving than others. OO is a different matter because you get different *types* of objects. You don't get different *types* of strings, integers or floats, or at least, not to the same degree. People using PHP shouldn't have to know about those differences unless they really need to. 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. It's optional, sure, but it's one more thing that every newbie will need to be aware of before s/he can call himself a PHP developer. Every one of those optional features that is added to the language is another barrier against takeup. > 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. You, a handful of list lurkers, Jochem hanging in there for his one-man-crusade (he wants to formalize PHP core development so much that nobody will do it for pleasure ever again), Derick inexplicably backing you. Nobody else even bothering to argue because Stas seems to be doing the job fairly well all by himself right now. Johannes quite rightly won't introduce type hinting for scalars without a mandate, and there doesn't appear to be one right now. If it _is_ accepted it'll most likely be in PHP 6 not 5.3 anyway, because 5.3's features were agreed (and limited) a couple of months ago. - Steph