This is what I'm saying.
But the current grammar lacks within the use of const and final!
And that's what it's all about - that's my point. ;)
Lukas Kahwe Smith schrieb:
On 13.02.2008, at 21:52, Andi Gutmans wrote:
Guys,
I think we are over-engineering and over-complicating here. Reminds me
On 13.02.2008, at 21:52, Andi Gutmans wrote:
Guys,
I think we are over-engineering and over-complicating here. Reminds
me of all the ugly workarounds in C++.
If this is really what you need then just declare it private/
protected and create accessor methods (getters/setters).
I don't thin
> Cc: Felipe Pena; internals@lists.php.net
> Subject: Re: [PHP-DEV] final keyword
>
> Hey you guys,
>
> but the construct
> private : public $bar = 'foo';
> addresses actually another - fairly similar - issue.
>
> whereas I believe it's sufficient just
Hey you guys,
but the construct
private : public $bar = 'foo';
addresses actually another - fairly similar - issue.
whereas I believe it's sufficient just extending the const
or final keyword, which introduces not a new "language construct" and
thus affects really nothing but issue.
Your
Hello Felipe,
I do not like readonly, instead I would prefer a version where read and
write have separate visibility. And actually your idea seems to prevent a
second write to the value, using NULL as for detection means. Now what
happens is that a) a property that has a default value will becom
Em Qua, 2008-02-13 às 10:59 +0100, Sebastian Schneider escreveu:
> By the way, when declared final the value couldn't be changed, anyways -
> however it MUST be read-only.
I made a ***simple*** (or wrong!) patch months ago for read-only
property as you described.
http://felipe.ath.cx/diff/readonl
actually, the method SHOULD NOT be named get_status but getStatus :P
(sorry for that, but couldn't help myself - feel free to get even ;) )
By the way, when declared final the value couldn't be changed, anyways -
however it MUST be read-only.
But using a method like the one you suggested is j
Plus as it is a constant it's value cannot be changed in the context of the
object.
However you could implement a method for this, e.g. get_status(); which then
returns an array. But the final keyword would be more comfortable
"Sebastian Schneider" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
Sebastian Bergmann schrieb:
Sebastian Schneider schrieb:
public static final $bar = "foobar's world";
We have the const keyword for that.
But doesn't work with arrays, e.g.
public class Result {
const DECISION_PERMIT = 0;
const DECISION_DENY = 1;
Sebastian Schneider schrieb:
public static final $bar = "foobar's world";
We have the const keyword for that.
--
Sebastian Bergmann http://sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69
--
PHP Internals - PHP Runtime
Hey you guys,
it would be very helpful to be able using the keyword _final_ not only
for classes and methods but for variables as well - such as
to prevent changes from outside though at least publicly readable.
Sebastian
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscri
11 matches
Mail list logo