Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44701 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68375 invoked from network); 4 Jul 2009 17:44:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jul 2009 17:44:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=david.zuelke@bitextender.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=david.zuelke@bitextender.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain bitextender.com from 80.237.132.12 cause and error) X-PHP-List-Original-Sender: david.zuelke@bitextender.com X-Host-Fingerprint: 80.237.132.12 wp005.webpack.hosteurope.de Received: from [80.237.132.12] ([80.237.132.12:43502] helo=wp005.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/0A-06257-F059F4A4 for ; Sat, 04 Jul 2009 13:44:49 -0400 Received: from dslb-088-064-059-059.pools.arcor-ip.net ([88.64.59.59] helo=[192.168.0.102]); authenticated by wp005.webpack.hosteurope.de running ExIM with esmtpsa (TLSv1:RC4-SHA:128) id 1MN9I4-0000s0-6Q; Sat, 04 Jul 2009 19:44:44 +0200 References: <5A834C9A-6D1B-49B7-88E6-FF047B084AB6@pooteeweet.org> Message-ID: <85761455-38F0-40E1-935D-9DDE1A0AC8A0@bitextender.com> To: Derick Rethans In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (7A341) Mime-Version: 1.0 (iPhone Mail 7A341) Date: Sat, 4 Jul 2009 19:45:27 +0200 Cc: Lukas Kahwe Smith , PHP Internals X-bounce-key: webpack.hosteurope.de;david.zuelke@bitextender.com;1246729489;eebeaebd; Subject: Re: [PHP-DEV] weak and strict type checking RFC From: david.zuelke@bitextender.com (=?utf-8?Q?David_Z=C3=BClke?=) On 04.07.2009, at 14:27, Derick Rethans wrote: > So I would propose to: > > 1. have ilia's strict typing patch (minus scalar and numeric) > 2. have a patch that also adds for casting type hints from your RFC. > > Those could (and should) be considered as *two* new features. > > As for syntax, I believe the following would be best: > > function add_user(string $name, string $phone_number, (int) $age) > { .. } > > because: > 1. the casting type hint "(int) $var" is used for normal casting > already > 2. the strict type hint "int $var" is already used for class names +1