<HEAD><TITLE>discuss@charon: [1238] in "Coldmud discussion meeting"</TITLE>
<H1>[1238] in Coldmud discussion meeting</H1></HEAD>
<A HREF="/"><IMG SRC="/i-d.gif" ALT="root"></A>
<A HREF="?1238"><IMG SRC="/i-back.gif" ALT="meeting"></A>
<A HREF="/help.html"><IMG SRC="/i-help.gif" ALT="help"></A>
<A HREF="1"><IMG SRC="/i-first.gif" ALT="first"></A>
<A HREF="1235"><IMG SRC="/i-fref.gif" ALT="first in chain"></A>
<A HREF="1237"><IMG SRC="/i-pref.gif" ALT="previous in chain"></A>
<A HREF="1237"><IMG SRC="/i-prev.gif" ALT="previous"></A>
<A HREF="1239"><IMG SRC="/i-next.gif" ALT="next"></A>
<A HREF="1239"><IMG SRC="/i-nref.gif" ALT="next in chain"></A>
<A HREF="1241"><IMG SRC="/i-lref.gif" ALT="last in chain"></A>
<A HREF="1641"><IMG SRC="/i-last.gif" ALT="last"></A>
<HR><H2>Re: [COLD] public/private/protected object variables</H2>
<H3>daemon@ATHENA.MIT.EDU (Sat Mar  1 15:39:07 1997
)</H3>
<PRE>
Date: Sat, 1 Mar 1997 12:28:54 -0700 (MST)
From: Brandon Gillespie &lt;brandon@cold.org&gt;
To: Jeff Kesselman &lt;jeffk@tenetwork.com&gt;
cc: coldstuff@cold.org
In-Reply-To: &lt;3.0.32.19970301103410.006c7024@mail.tenetwork.com&gt;

On Sat, 1 Mar 1997, Jeff Kesselman wrote:
&gt; Um, 
&gt; My comment is you convinced me quite awhile back that absolute
&gt; incapsulation is a good thing.
&gt; I've never found the real need to break it, there was always a reasonable
&gt; encapsulated alternative... the ONLy time i thought itw as trouble was that
&gt; members couldn't be accessed easily for modification external debugging
&gt; tools... whiel that still MIGHT be an issue, I certainly foudn on
&gt; retrospect perfectly resonable ways to do what I was trying to do with
&gt; MUDEDIT.
&gt; 
&gt; I guess I'ld have to say I think its a bad ideas. I think its dilutes the
&gt; strengths of COldC-- oen of which is that it breaks your sloppy C++ habits
&gt; and FORCES yo uto learn how to write really good object orinted code.
&gt; 
&gt; Opinionated as always,

But this isn't breaking the encapsulation--it is simply changing the
default value when a specific instance is not defined.  The variable still
can only be assigned-to/referenced by the defining object.  For a better
explanation I'll give the example given to me:

$thing has:
   ,weight
   ,mass
   ,integrity

derived is a $knife, which changes weight, mass and integrity for a
generic sword, and adds a 'sharpness'.

If you want a specific instance of a knife you have to basically reset all
of the $thing values to be the same as $knife--when it'd be easier just to
make it a public variable (i.e. the 'default' value is that of the first
instance in the ancestor tree)--and only change what you care about.

-Brandon Gillespie

</PRE>
