Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34349 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82443 invoked by uid 1010); 3 Jan 2008 20:40:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82423 invoked from network); 3 Jan 2008 20:40:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2008 20:40:33 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.189 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.198.189 rv-out-0910.google.com Received: from [209.85.198.189] ([209.85.198.189:60962] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/72-20810-C384D774 for ; Thu, 03 Jan 2008 15:40:30 -0500 Received: by rv-out-0910.google.com with SMTP id k15so4780886rvb.23 for ; Thu, 03 Jan 2008 12:40:25 -0800 (PST) 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:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=vYLHjrcOtuNnPeC2b0GheeojWlxEIk6Kqbwkn3QZUEI=; b=NN+pv0reSKNc77stz0/Xb06XyxHmS0fpbgQzX8cp2DiYrDiR0/btYISrj2d4k0KbqJhSJ9olUDF/r7y2n2gFoXeDhm2YJF6SsVl6Zrp53v0eOzwpgRndW0MHinGcNewb8oVpl3hH7b4+iViGch3V6O3fJ2AzGpQgSMXH6HUAq6I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fzSeiK7wv8zdDJ7AQxTAqbDTi6MEweTZ1G6puYb8On3tFUcW+4QUPQuMudqOWpHgWMeyBe5yqDGLrkwPxsE3hjKLsmyXZE5udbTaGn7hOK2NDOjdkBVPN6DWSMA/SUaKxM1iHtdg/Hxdb3g5AnQeDKMAnQER/K5/cfg3GChTU+Y= Received: by 10.141.79.12 with SMTP id g12mr8356626rvl.182.1199392825096; Thu, 03 Jan 2008 12:40:25 -0800 (PST) Received: by 10.141.177.21 with HTTP; Thu, 3 Jan 2008 12:40:25 -0800 (PST) Message-ID: Date: Thu, 3 Jan 2008 21:40:25 +0100 To: "Derick Rethans" Cc: "Stanislav Malyshev" , "Markus Fischer" , internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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> Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: pierre.php@gmail.com (Pierre) On Jan 3, 2008 8:23 PM, Derick Rethans wrote: > On Thu, 3 Jan 2008, Stanislav Malyshev wrote: > > > > When the type hint says I want an integer, then only integer should be > > > accepted; no casting should be done. It may give predictable results > > > > Why people that want Java just don't use Java I wonder? PHP never was a strict > > static typed language. > > Broken record perhaps? I am getting a bit tired of this "just use Java > argument", it's perhaps even a bit arrogant. It is arrogant. For what I see the strictness is making its way in php simply like OO made it. First we resist (we all remember how hard it was to introduce OO API to some extensions "why bloat it with OO?"). In doubts, we only need to look at all the OO strictness we added in the past versions. Please not that I use "we" for all php internals developers, as a group (even if we all have different opinions, we reflect only one in our releases). > From what I read there is > plenty of people that want type hints for static types - there's a few > patches out there, it doesn't slow down the general case. So why should > we *not* add it? (And yes, I changed my mind) Mines was always in favor of strictness for all types. As it is not necessary to create clean code, it is a really nice addition to bring PHP to yet another good level. Without talking about reducing the WTF in some cases, especially when you have to work in teams with developers not aware of PHP's "weirdness" (please don't tell me to ask them to RTFM, that's off base). Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org