Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37096 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30612 invoked from network); 17 Apr 2008 17:27:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 17:27:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.248 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 209.85.132.248 an-out-0708.google.com Received: from [209.85.132.248] ([209.85.132.248:9320] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/EA-05127-88887084 for ; Thu, 17 Apr 2008 13:27:38 -0400 Received: by an-out-0708.google.com with SMTP id c18so37293anc.1 for ; Thu, 17 Apr 2008 10:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=dCxfEGVjixys6NyJqSu8k9oFxjuGM5V2nrms0B+ij58=; b=JTAWE2UL5m/vLkPJ+uukUzLyhKUR/mtXveO3EjanntCfobE6aS1K/f7MgTlgpyIQRTJzd/1a2AwY8dloZHKuP2DcFV1nRN97Z5B5e0E4NlidlI4Clgd9Tbzofdj+KpEzXD82HKvmWyeFt/XcSuzIqxHu4ISTW12bIhShEjNHV8o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=dxQp/zo26MPfyJYqw7lNwq81UoUnWfrif1Bwsdz/B7RG7NEMGVmDJONndi55lr//LMchqjsS7xqtlKmkEt3+aqQQMWy16vD3kOdDjB17rip1OKQzRN25LLpr43VcKkb0hk6fsfOu7US8qDTeq2avZ0zWEQFusJnpBfBgzixCVQc= Received: by 10.100.194.17 with SMTP id r17mr2966152anf.127.1208453254198; Thu, 17 Apr 2008 10:27:34 -0700 (PDT) Received: from ?10.0.18.8? ( [157.86.206.62]) by mx.google.com with ESMTPS id s40sm10777401hsb.13.2008.04.17.10.27.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 17 Apr 2008 10:27:30 -0700 (PDT) To: Sam Barrow Cc: Chris Stockton , internals@lists.php.net In-Reply-To: <1208449863.32403.17.camel@sbarrow-desktop> References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> <48076FB3.1040303@cschneid.com> <1208448096.32403.13.camel@sbarrow-desktop> <1208449863.32403.17.camel@sbarrow-desktop> Content-Type: text/plain; charset=utf-8 Date: Thu, 17 Apr 2008 14:27:23 -0300 Message-ID: <1208453243.5366.50.camel@felipe> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Re: [RFC] Strict type hints (parameter and return value) From: felipensp@gmail.com (Felipe Pena) Em Qui, 2008-04-17 às 12:31 -0400, Sam Barrow escreveu: > On Thu, 2008-04-17 at 09:18 -0700, Chris Stockton wrote: > > On Thu, Apr 17, 2008 at 9:01 AM, Sam Barrow wrote: > > > > > I like this alot better too, the only downside is compatibility > > > problems. > > > > > > Can you explain, I understand; in partial the problem but I am curious what > > can not be solved through added logic? > > function int() { > } > > PHP won't know if this is a return type hint or function name. This > specific case might be solvable with added logic though, I really don't > know how to do it or how hard it would be; alot of this is done in the > parser which I am only slightly familiar with. > I'm not a bison expert, but i don't know how make the parser accepts 'function type name()', actually i get two Shift/reduce and two Reduce/reduce conflicts because the T_STRING as a possible type name. ... Maybe it is an known issue. -- Regards, Felipe Pena.