Re: [PHP-DEV] Re: private, protected, readonly, public

2006-05-13 Thread Jeff Moore
On May 13, 2006, at 7:18 PM, Marcus Boerger wrote: hehe, maybe confused with delphi or borlands c++ additons? Speaking of which before we add 'readonly' we should go for full property support but on the other hand that might be a little bit too much until php is used with code generators an

Re: [PHP-DEV] private, protected, readonly, public

2006-05-13 Thread Jason Garber
Hello Marcus, class x { public readonly $xyz; protected readonly $abc; } Definitions: - public readonly- outside class can only read, not write. - protected readonly - subclass can only read, not write. - private readonly - does not make sense - do not support. Ho

RE: [PHP-DEV] Re: private, protected, readonly, public

2006-05-13 Thread Mauro Nicolás Infantino
Marcus, Just my two cents... Maybe it's better to see it the other way round. Maybe php won't be used with code generators and gui designers until full property support is developed. Marcus Boerger wrote: > Hello Ron, > > hehe, maybe confused with delphi or borlands c++ additons? > Speaking o

Re: [PHP-DEV] private, protected, readonly, public

2006-05-13 Thread Alan Knowles
Definatly would love to see readonly, It would remove 1000's of lines of useless code from 100's of projects - which might make a few more public PHP projects readable ;) It replaces pointless giberish with something explicit clean and elegant.. Looks alot tidier than getters, or __get kludges.

Re: [PHP-DEV] Re: private, protected, readonly, public

2006-05-13 Thread Marcus Boerger
Hello Ron, hehe, maybe confused with delphi or borlands c++ additons? Speaking of which before we add 'readonly' we should go for full property support but on the other hand that might be a little bit too much until php is used with code generators and gui designers where code inspectors execute

Re: [PHP-DEV] Re: private, protected, readonly, public

2006-05-13 Thread Ron Korving
My bad, you are absolutely right, I must be confused with another language, but I wonder which one odd. Ron "Hartmut Holzgraefe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ron Korving wrote: > > In C++ you'd use private for this. All object members are readable, ... > > Co

Re: [PHP-DEV] Re: tests

2006-05-13 Thread Marcus Boerger
Hello Hartmut, Saturday, May 13, 2006, 5:15:11 PM, you wrote: > Jeff Moore wrote: >> >> On May 13, 2006, at 10:08 AM, Marcus Boerger wrote: >> >>> Therefor we need more tests. >> >> Hi, >> >> I just wanted to point out that >> >> http://www.w3.org/XML/Test/ >> >> has thousands of XML test c

Re: [PHP-DEV] Re: private, protected, readonly, public

2006-05-13 Thread Hartmut Holzgraefe
Ron Korving wrote: In C++ you'd use private for this. All object members are readable, ... Could you elaborate on this? -- Hartmut Holzgraefe, Senior Support Engineer. MySQL AB, www.mysql.com Are you certified? http://www.mysql.com/training/certification -- PHP In

Re: [PHP-DEV] Re: tests

2006-05-13 Thread Hartmut Holzgraefe
Jeff Moore wrote: On May 13, 2006, at 10:08 AM, Marcus Boerger wrote: Therefor we need more tests. Hi, I just wanted to point out that http://www.w3.org/XML/Test/ has thousands of XML test cases in a well defined format (XML, of course). They might be good for testing the XML processing

Re: [PHP-DEV] Re: tests

2006-05-13 Thread Jeff Moore
On May 13, 2006, at 10:08 AM, Marcus Boerger wrote: Therefor we need more tests. Hi, I just wanted to point out that http://www.w3.org/XML/Test/ has thousands of XML test cases in a well defined format (XML, of course). They might be good for testing the XML processing portions of PHP.

[PHP-DEV] Re: tests

2006-05-13 Thread Marcus Boerger
Hello Oliver, php source comes with 'run-tests.php' script (try: php run-tests.php -h) and currently with over 2000 test scripts. However as http://gcov.php.net shows this triggers less than 50% of the code. That means that we do not test a lot of out code base and hence have no way to protect u

Re: [PHP-DEV] private, protected, readonly, public

2006-05-13 Thread Marcus Boerger
Hello Sara, while all what you wrote is doable i'd suggest a slightly different approach. If the name of the variable is prefixed with "r_" and written from outside the class an error will be issued. There's only one thing to be considered. The proposal cannot work for overloaded internal objec

Re: [PHP-DEV] private, protected, readonly, public

2006-05-13 Thread Marcus Boerger
Hello Etienne, Friday, May 12, 2006, 2:11:38 PM, you wrote: > Hi, > my 2c: > 1) it shouldn't replace the visibility definition: we could also have > protected readonly properties. same here visibility and read/write control are two seperate things. > 3) how would you check if the property if