[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initial comments

This page is part of the web mail archives of SRFI 100 from before July 7th, 2015. The new archives for SRFI 100 contain all messages, not just those from before July 7th, 2015.

2009/9/15 Shiro Kawai <shiro@xxxxxxxx>

What I expect when I see an immutable field is that,
literally, the value of the field doesn't change over
time, no matter what happens.  Thus I can cache the
value in the client side, for example.   Or I can avoid
locking to read the immutable fields, for no other thread
can possibly change their values.  It doesn't matter
whether the value can be changed by "private" methods
or not.  What matters is whether the value will ever
change or not.

As programmers themselves can make a data field to be mutable or immutable,
they can make a mutator-functioning method or not.