Re: rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON
| From: | André Rømcke | Date: | Tue, 02 Nov 2010 22:07:55 +0000 |
| Subject: | Re: rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50088@lists.php.net to get a copy of this message | ||
On Mon, Nov 1, 2010 at 9:47 PM, Felipe Pena <felipensp@gmail.com> wrote:
> 2010/11/1 Richard Lynch <ceo@l-i-e.com>
>
> > On Fri, October 29, 2010 7:47 pm, admin wrote:
> > > WTF is T_PAAMAYIM_NEKUDOTAYIM?
> > >
> > > This has to be THE most asked question by new php developers when they
> > > come across it. Can we please change the token name to T_DOUBLE_COLON
> > > so I don't have to hear about it constantly?
> > >
> > > Those that disagree don't do enough PHP support to know how often it
> > > is
> > > asked. it's worth it.
> >
> > -1
> >
> >
> Instead of renaming the token, I prefer to associate a literal string to
> each token, to have a legible error message, without the T_ being shown.
>
> For example, we could use in the Bison grammar file:
> %token T_PAAMAYIM_NEKUDOTAYIM "::"
>
> So that the error message become:
>
> $ sapi/cli/php -r '::'
> Parse error: syntax error, unexpected :: in Command line code on line 1
>
> Instead of the known "unexpected T_PAAMAYIM_NEKUDOTAYIM" one.
>
+1 on implementing this so we don't have to wait for lemon.
While knowing how to use a search engine is good, it's even better to not
have to and save the time spent on it.
> --
> Regards,
> Felipe Pena
>