in Coldmud discussion meeting
daemon@ATHENA.MIT.EDU (Tue May 17 18:45:14 1994
To: Colin McCormack <email@example.com.OZ.AU>
In-Reply-To: Your message of Wed, 18 May 94 06:35:47 +1000.
Date: Tue, 17 May 94 18:37:39 EDT
From: Greg Hudson <ghudson@MIT.EDU>
> In defense of connection(), mooted primitive returning current
> 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.)