Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Martin Scotta
On Wed, Mar 9, 2011 at 3:23 PM, Chad Fulton wrote: > Hello, > > On Wed, Mar 9, 2011 at 10:02 AM, Jarrod Nettles > wrote: > > Interesting question. My gut tells me not (as does three years of C# > experience). I’m sure that everyone will have a different opinion on this > but to me it seems taboo

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Martin Scotta
class modifiers should follow the same modifiers and semantic that methods: T_PUBLIC, T_PROTECTED and T_PRIVATE should be used. nowadays all classes are public... T_PUBLIC: everybody can see it, everybody can subclass it T_PROTECTED: visible only within its ns, but everybody can subclass it T_PRI

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Chad Fulton
Hello, On Wed, Mar 9, 2011 at 10:02 AM, Jarrod Nettles wrote: > Interesting question. My gut tells me not (as does three years of C# > experience). I’m sure that everyone will have a different opinion on this but > to me it seems taboo that a child class override the visibility of the parent >

RE: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Jarrod Nettles
Interesting question. My gut tells me not (as does three years of C# experience). I’m sure that everyone will have a different opinion on this but to me it seems taboo that a child class override the visibility of the parent class. For example, PHP currently does not allow you to override a meth

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread James Butler
>> Proposal (after five minutes of thought) >> >> >> 1. Public - A class can be instantiated or called statically from >> anywhere. For reasons of backward compatibility a class without any modifier >> would be considered public. >> >> 2. Internal - A class can only be instantiated/cal

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Hannes Landeholm
Good Sugesstion. Currently I'm forced to use huge internal classes for my framework because dividing them into smaller classes would expose internal behavior to the "outside"... the application layer. This would solve that problem. ~Hannes On 3 March 2011 18:21, Jarrod Nettles wrote: > Has t

RE: [PHP-DEV] Class Access Modifiers

2011-03-08 Thread Jarrod Nettles
Either that or it should be spun off into its own RFC. I have no idea how to do either. From: Martin Scotta [mailto:martinsco...@gmail.com] Sent: Thursday, March 03, 2011 12:09 PM To: Jarrod Nettles Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Class Access Modifiers I'm writing

Re: [PHP-DEV] Class Access Modifiers

2011-03-03 Thread Martin Scotta
I'm writing a RFC about improvements on the current OO Model. do you want to add this? http://wiki.php.net/rfc/object-model-improvements Martin Scotta On Thu, Mar 3, 2011 at 2:21 PM, Jarrod Nettles wrote: > Has there been any discussion on access modifiers for classes? I looked > through th

[PHP-DEV] Class Access Modifiers

2011-03-03 Thread Jarrod Nettles
Has there been any discussion on access modifiers for classes? I looked through the existing RFCs and searched through old discussions on the mailing list but didn't come up with anything. Specifically, I think it would be beneficial (for framework developers in particular) if classes could be