Re: RFC: Making T_FUNCTION optional in method declarations
| From: | dukeofgaming | Date: | Thu, 02 Dec 2010 10:03:11 +0000 |
| Subject: | Re: RFC: Making T_FUNCTION optional in method declarations | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50806@lists.php.net to get a copy of this message | ||
How about deprecation then?
On Thu, Dec 2, 2010 at 3:58 AM, André Rømcke <ar@ez.no> wrote:
> On Thu, Dec 2, 2010 at 10:34 AM, Patrick ALLAERT <patrickallaert@php.net
> >wrote:
>
> > 2010/11/30 Kalle Sommer Nielsen <kalle@php.net>:
> > > Hi
> > >
> > > 2010/11/30 Patrick ALLAERT <patrickallaert@php.net>:
> > >> With this patch, something looks inconsistent to me:
> > >> Both properties and methods have a visibility
> > >> (public|protected|private) and a keyword: "var" (T_VAR) and
> > >> "function"
> > >> (T_FUNCTION) respectively.
> > >> However "private var $foo;" generates a fatal error but "private
> > >> function foo(){}" not?
> > >
> > > The "var" keyword is an alias of the "public" keyword for BC with
> > > PHP4. So it would be illogically to declare a property both private
> > > and public at the same time ;-)
> >
> > Shouldn't we get rid of that kind of pre-PHP5 stuff _before_
> > introducing the possible omission of T_FUNCTION?
>
>
> Why?
>
> This will break lots of code, does it improve anything while at it? Is
> 'var'
> hindering anything? Is it taking up a lot of code?
> If it is removed then that should be in trunk aka "6.0" the 2nd , and not
> in
> 5.x.
>