On Mon, Dec 17, 2007 at 09:50:32PM +0000, Nicholas Clark wrote:
> On Mon, Dec 17, 2007 at 10:06:42AM -0600, Andy Lester wrote:
> > Andy: My consting has run into its greatest challenge yet.
> > Andy: Making self args to PMCs consts where appropriate.
> > Andy: <jarring chord>
> > Andy: INTVAL such_and_such_elements( PMC *self );
> > Andy: Tell me that *self shouldn't be const.
> > Andy: Go on, tell me.
> > Andy: You can't.
> > 
> > particle: of course i can't
> > particle: in accessors, self should be constant
> 
> The equivalent would break in Perl 5, where the "objects" can change internal
> private state as a side effect of being read. For example, conversions are
> cached.

Which is where, in C++, you would be using the mutable keyword.  I don't
think this has yet made it into any C standard, but my knowledge in
these areas is a little out of date.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

Reply via email to