Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34386 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15941 invoked by uid 1010); 4 Jan 2008 01:16:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 15926 invoked from network); 4 Jan 2008 01:16:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 01:16:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=markus@fischer.name; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=markus@fischer.name; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fischer.name from 213.46.255.22 cause and error) X-PHP-List-Original-Sender: markus@fischer.name X-Host-Fingerprint: 213.46.255.22 viefep18-int.chello.at Solaris 10 (beta) Received: from [213.46.255.22] ([213.46.255.22:31646] helo=viefep33-int.chello.at) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/3A-20810-1D88D774 for ; Thu, 03 Jan 2008 20:16:02 -0500 Received: from genuine.home ([84.112.136.139]) by viefep33-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20080104011558.OSCZ28696.viefep33-int.chello.at@genuine.home>; Fri, 4 Jan 2008 02:15:58 +0100 Received: from chello084112136139.36.11.vie.surfer.at ([84.112.136.139] helo=[192.168.1.51]) by genuine.home with esmtpa (Exim 4.50) id 1JAb30-0003JK-Jd; Fri, 04 Jan 2008 02:08:32 +0100 Message-ID: <477D88C8.9020502@fischer.name> Date: Fri, 04 Jan 2008 02:15:52 +0100 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Stanislav Malyshev CC: Alain Williams , internals@lists.php.net 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> <20080104004706.GX7861@mint.phcomp.co.uk> <477D87A6.7040705@zend.com> In-Reply-To: <477D87A6.7040705@zend.com> X-Enigmail-Version: 0.95.5 OpenPGP: id=C2272BD0; url=http://markus.fischer.name/my_public_key.txt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -28 X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "genuine.home", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stanislav Malyshev wrote: >> You aren't making it a strict static typed language. All that you are >> doing >> is saying that at certain points (function entry) that the values are >> checked >> and converted to certain types. If within the fuction an argument >> hinted as >> integer is used in a string context, the juggling will still happen. > > So it's basically another way to say (string)? Again, that's not what > was said by other people discussing it. But all that just to save one > (string) inside function? [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -3.3 ALL_TRUSTED Did not pass through any untrusted hosts -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0004] 2.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [84.112.136.139 listed in dnsbl.sorbs.net] 1.1 AWL AWL: From: address is in the auto white-list Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: markus@fischer.name (Markus Fischer) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stanislav Malyshev wrote: >> You aren't making it a strict static typed language. All that you are >> doing >> is saying that at certain points (function entry) that the values are >> checked >> and converted to certain types. If within the fuction an argument >> hinted as >> integer is used in a string context, the juggling will still happen. > > So it's basically another way to say (string)? Again, that's not what > was said by other people discussing it. But all that just to save one > (string) inside function? I agree with Stanislav here. For me "type hinting" has nothing to do with "type conversion". Hinting a 'string' expects a string, nothing else, not even an object. If you need this, you need to call the function/method with an explicit conversion. It's a less 'wtf' factor going on. - - Markus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHfYjI1nS0RcInK9ARAvEwAKC0WhOjaogX+f84rQArW5s071fSDgCgriWl 1+JM1RK46VVFL7Bz8pjjID0= =ORed -----END PGP SIGNATURE-----