Re: Re: [RFC] Strict type hints (parameter and return value)
| From: | Felipe Pena | Date: | Thu, 17 Apr 2008 17:27:23 +0000 |
| Subject: | Re: Re: [RFC] Strict type hints (parameter and return value) | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37096@lists.php.net to get a copy of this message | ||
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 <sam@sambarrow.com> 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.