Re: [PHP-DEV] Const member functions

2006-09-13 Thread Terje Slettebø
> > In C++, it's possible to declare member functions "const" meaning they don't > > change the object they operate on. This can help reason about programs, > > because if you have something like (PHP syntax): > > It would be pretty hard to enforce in PHP - how do you know the object > is not chang

Re: [PHP-DEV] Const member functions

2006-09-13 Thread Stanislav Malyshev
In C++, it's possible to declare member functions "const" meaning they don't change the object they operate on. This can help reason about programs, because if you have something like (PHP syntax): It would be pretty hard to enforce in PHP - how do you know the object is not changed, without st