>
> You mean like an interface adds abstract to all functoins...
exactly. needless to say, that the variable $this would not be available in those
classes and that subclasses of that class have to be static also. what i'm not sure
about is, if it would be better to let ppl type static on the
Hello Michael,
Thursday, September 30, 2004, 9:19:12 PM, you wrote:
>> 1. static classes:
>> static classes can only contain static methods and attributes
>>
> what would be even easier than the above:
> if a class is declared "static" or "final static", the attributes and
> methods in that
> 1. static classes:
> static classes can only contain static methods and attributes
>
what would be even easier than the above:
if a class is declared "static" or "final static", the attributes and
methods in that function are static by default, so you don't need to
type static on every method a
> Ah so it is just a little bit more enforcement then the following:
>
> final class DB
> {
> // prevent instantiation
> private function __construct() { exit(0); }
>
> // The following is not needed because the constructor cannot be
called
> // private function __clone() { exit(0)
Hello Michael,
Wednesday, September 29, 2004, 11:44:04 AM, you wrote:
>> > 2. final classes:
>> > final classes can't be extended
>>
>> already supported
> Cannot find it in the docs.
> http://www.php.net/manual/en/language.oop5.final.php doesn't seem to have
> any comments on that.
> I'm not a
it seems to me that the documentation pointed to is a little out of
date, at least the part about reflection is using 'old' (read:
notStudlyCapsCS) class names - might be worth fixing that to avoid a
hundred-thousand emails along the lines of 'reflection is broken'.
kind regards,
Jochem
ps - I
Michael Virnstein wrote:
2. final classes:
final classes can't be extended
already supported
Cannot find it in the docs.
http://www.php.net/manual/en/language.oop5.final.php doesn't seem to have
any comments on that.
I'm not at home at the moment, so i couldn't try, but are you really s
[EMAIL PROTECTED] wrote:
Thanks! What would probably be a good thing, is to mention that in the docs
for the final keyword.
Make the constructor private and the class final. No instance will be
available,
and no inheritance possible. Methods has to work, and therefore they may
not
expect to have
Michael Virnstein wrote:
>>> 2. final classes:
>>> final classes can't be extended
>>
>>
>> already supported
>
>
>
> Cannot find it in the docs.
> http://www.php.net/manual/en/language.oop5.final.php doesn't seem to have
> any comments on that.
> I'm not at home at the moment, so i couldn't try, b
> > 2. final classes:
> > final classes can't be extended
>
> already supported
Cannot find it in the docs.
http://www.php.net/manual/en/language.oop5.final.php doesn't seem to have
any comments on that.
I'm not at home at the moment, so i couldn't try, but are you really sure
that final CLASSES
Hello Michael,
Tuesday, September 28, 2004, 3:44:48 PM, you wrote:
> things i'd like to add:
> 2. final classes:
> final classes can't be extended
already supported
> 4. abstract classes can be defined static also
makes no sense (duplicate): both mean you cannot instantiate the class.
> abs
things i'd like to add:
4. abstract classes can be defined static also
this means that all subclasses of foo must also be static and can only
contain static methods and attributes
5. abstract classes can't be defined final
Regards, Michael
Michael Virnstein wrote:
Hi Devs,
what would probably be
i don't any experience with java, but i ran into a case, where this
would have been useful. And i disagree with the "too much was added
already". I think that php, dispite all the added stuff, is still easy
to learn, easy to read and easy to work with. PHP simply got more
powerful and i hope it
Michael Virnstein wrote:
What do you think about it?
PINJ (PHP Is Not Java) ;-)
Let's keep the language simple, too much was added already IMHO (-:C
- Chris
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
14 matches
Mail list logo