Re: [PHP-DEV] Class Constant Finalization

2017-01-25 Thread Rowan Collins
On 25/01/2017 08:49, Niklas Keller wrote: 2017-01-25 9:27 GMT+01:00 Wes : They don't belong to a class only, but to a class and all its descendants. Ideally, descendants should not inherit constants (or anything static), but we can't change that now, so final could make sense here. Basically, t

Re: [PHP-DEV] Class Constant Finalization

2017-01-25 Thread Niklas Keller
2017-01-25 9:27 GMT+01:00 Wes : > They don't belong to a class only, but to a class and all its descendants. > Ideally, descendants should not inherit constants (or anything static), but > we can't change that now, so final could make sense here. Basically, they > should work exactly like static f

Re: [PHP-DEV] Class Constant Finalization

2017-01-25 Thread Wes
They don't belong to a class only, but to a class and all its descendants. Ideally, descendants should not inherit constants (or anything static), but we can't change that now, so final could make sense here. Basically, they should work exactly like static fields, except that static fields can be r

Re: [PHP-DEV] Class Constant Finalization

2017-01-25 Thread Stanislav Malyshev
Hi! >> Given that we can now declare a class constant as public, protected, or >> private, can we also declare them final in 7.2? > > That doesn't make much sense to me. Constant belongs to a class. I don't > see much utility in "no class extending from this one can define > constant with the sam

Re: [PHP-DEV] Class Constant Finalization

2017-01-25 Thread Stanislav Malyshev
Hi! > Given that we can now declare a class constant as public, protected, or > private, can we also declare them final in 7.2? That doesn't make much sense to me. Constant belongs to a class. I don't see much utility in "no class extending from this one can define constant with the same name". f

Re: [PHP-DEV] Class Constant Finalization

2017-01-24 Thread Wes
Amazing how constants are not constant :P

Re: [PHP-DEV] Class Constant Finalization

2017-01-24 Thread Nikita Nefedov
> On 25 Jan 2017, at 09:48, Scott Arciszewski wrote: > > All, > > Given that we can now declare a class constant as public, protected, or > private, can we also declare them final in 7.2? > > https://3v4l.org/rJG0V > > Ideally, this code would error on line 18 rather than 15. > > Scott Arci

[PHP-DEV] Class Constant Finalization

2017-01-24 Thread Scott Arciszewski
All, Given that we can now declare a class constant as public, protected, or private, can we also declare them final in 7.2? https://3v4l.org/rJG0V Ideally, this code would error on line 18 rather than 15. Scott Arciszewski Chief Development Officer Paragon Initiative Enterprises