[242] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: Connection()

daemon@ATHENA.MIT.EDU (Tue May 17 18:45:14 1994 )

To: Colin McCormack <colinm@extro.ucc.su.OZ.AU>
Cc: coldstuff@MIT.EDU
In-Reply-To: Your message of Wed, 18 May 94 06:35:47 +1000.
             <199405172035.GAA12040@extro.ucc.su.OZ.AU> 
Date: Tue, 17 May 94 18:37:39 EDT
From: Greg Hudson <ghudson@MIT.EDU>


> In defense of connection(), mooted primitive returning current
> connection:

> To follow the encapsulation argument, wouldn't have to conclude that
> that in order to address stdio in C, one should pass in their value,
> or a reference to some package containing them not merely where ever
> they were used, but whenever one wished to interface with a
> subsystem that might use them?

This is very vague, and I can't tell exactly what you mean here.  If
you mean that this argument implies that subsystems shouldn't make use
of stdout directly, then sure, I'll agree with that: it reduces my
flexibility to be unable to tell the subsystem where that output goes.

Note that Coldmud does not prohibit access to global data.  If you
want connection(), simply have the connection object tell $sys when
it's processing a line, and have a $sys.connection().  However,
routines which use $sys.connection() rather than accepting an argument
(or using sender()) will be less flexible.  (You might argue that it's
acceptable to use $sys.connection() as a default, which can be
overridden, in which case I might agree.)

--GBH