Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44667 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11487 invoked from network); 2 Jul 2009 18:09:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2009 18:09:29 -0000 Authentication-Results: pb1.pair.com header.from=M.Ford@leedsmet.ac.uk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=M.Ford@leedsmet.ac.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain leedsmet.ac.uk designates 207.126.144.127 as permitted sender) X-PHP-List-Original-Sender: M.Ford@leedsmet.ac.uk X-Host-Fingerprint: 207.126.144.127 eu1sys200aog109.obsmtp.com Linux 2.5 (sometimes 2.4) (4) Received: from [207.126.144.127] ([207.126.144.127:55023] helo=eu1sys200aog109.obsmtp.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/A7-09230-5D7FC4A4 for ; Thu, 02 Jul 2009 14:09:28 -0400 Received: from source ([160.9.192.20]) by eu1sys200aob109.postini.com ([207.126.147.11]) with SMTP ID DSNKSkz303iSoX5GpG4r/xpKV4AiLkodfgpr@postini.com; Thu, 02 Jul 2009 18:09:28 UTC Received: from leedsmet-exch1.leedsmet.ac.uk ([160.9.35.117]) by mrelay-c.lmu.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1MMQin-0000pU-4V for internals@lists.php.net; Thu, 02 Jul 2009 19:09:21 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 2 Jul 2009 19:09:21 +0100 Message-ID: <93ED589E60BA254F97435FE6C97F2C6702B925DD@leedsmet-exch1.leedsmet.ac.uk> In-Reply-To: <67163A6A-9C8F-4F59-82A4-0B46A2EBEAE9@pooteeweet.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: thread-topic: [PHP-DEV] Re: Flexible type hinting thread-index: Acn7FddnauVucNHdQ0C+AiS3M5P0EgAKUwfA References: <85073B28-671D-4A8F-B2D6-5704E3E180BB@ilia.ws> <89868409-EBAC-47DE-8D6D-0DCD88DE9DE6@ilia.ws> <67163A6A-9C8F-4F59-82A4-0B46A2EBEAE9@pooteeweet.org> To: "PHP Internals" Subject: RE: [PHP-DEV] Re: Flexible type hinting From: M.Ford@leedsmet.ac.uk ("Ford, Mike") > -----Original Message----- > From: Lukas Kahwe Smith [mailto:mls@pooteeweet.org] > Sent: 02 July 2009 14:05 > To: Ilia Alshanetsky > Cc: Paul Biggar; PHP Internals; Derick Rethans; Stanislav Malyshev; > Hannes Magnusson > Subject: Re: [PHP-DEV] Re: Flexible type hinting >=20 >=20 > On 02.07.2009, at 15:02, Ilia Alshanetsky wrote: >=20 > > Personally, I am uncertain about +int or -int in general, IMO that > > compromise will eventually be identical to numeric an cause > endless > > confusion for the users between (+/-)int and int. The reason I > used > > a completely different name is to prevent confusion. >=20 >=20 > I do not see the risk for confusion as being high. > Like I said, I havent made up my mind on this proposal, however for > now Paul mainly asked for feedback in the general concept, not > necessarily on the syntax. Interesting discussion. Not sure where I stand on this one, but I definitely don't like the [+-]int syntax. Even before Paul's proposal came out, though, I was thinking that I'd want to consider leveraging an existing well-understood syntax, so I could write function func(int $i) for strict type checking, and function func((int)$i) for coercion aka casting (although now I've seen it written down I'm not so sure! ;). I don't see the need for another option beyond the current syntax/behaviour -- in my opinion, anything else is documentation and should be treated as such. Cheers! Mike -- Mike Ford, Electronic Information Developer, C507, Leeds Metropolitan University, Civic Quarter Campus,=20 Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 812 4730 To view the terms under which this email is distributed, please go to http:= //disclaimer.leedsmet.ac.uk/email.htm