<HEAD><TITLE>discuss@charon: [756] in "Coldmud discussion meeting"</TITLE>
<H1>[756] in Coldmud discussion meeting</H1></HEAD>
<A HREF="/"><IMG SRC="/i-d.gif" ALT="root"></A>
<A HREF="?756"><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="751"><IMG SRC="/i-fref.gif" ALT="first in chain"></A>
<A HREF="755"><IMG SRC="/i-pref.gif" ALT="previous in chain"></A>
<A HREF="755"><IMG SRC="/i-prev.gif" ALT="previous"></A>
<A HREF="757"><IMG SRC="/i-next.gif" ALT="next"></A>
<A HREF="757"><IMG SRC="/i-nref.gif" ALT="next in chain"></A>
<A HREF="761"><IMG SRC="/i-lref.gif" ALT="last in chain"></A>
<A HREF="1641"><IMG SRC="/i-last.gif" ALT="last"></A>
<HR><H2>Re: tCD and ColdX mailing lists</H2>
<H3>daemon@ATHENA.MIT.EDU (Sun Jul 30 17:17:49 1995
)</H3>
<PRE>
Date: Sun, 30 Jul 1995 17:15:19 -0400 (EDT)
From: James C Deikun &lt;jcdst10+@pitt.edu&gt;
To: 869683 Gillespie Brandon James &lt;brandon@riverheights.declab.usu.edu&gt;
Cc: coldstuff@MIT.EDU
In-Reply-To: &lt;9507301655.AA00637@riverheights.declab.usu.edu&gt;



On Sun, 30 Jul 1995, 869683 Gillespie Brandon James wrote:

&gt; Until then, I have a question on functionality:
&gt; 
&gt; I am currently in the process of adding a higher level of file control to
&gt; the system.  Which of the following would you rather see:
&gt; 
&gt; read_file("filename", DBREF)
&gt; 
&gt; Where it opens file and reads blocks from it, sending them to DBREF until
&gt; the file is at it's end.

Sending them how?  Just like net connections?

&gt; Or:
&gt; 
&gt; open_file("filename", DBREF)
&gt;   (opens the file, read's nothing)
&gt; read_file()
&gt;   (read's a block of the file associated with this object, returns it in
&gt;    buffer form)
&gt; close_file("filename", DBREF)
&gt; 
&gt; Furthermore, there will also be:
&gt; 
&gt; stat_file("filename")
&gt; 
&gt; which will return some basic information on the file (does it exist?  etc)

Hm.  The answer is: neither.  Files are more complex than net 
connections, you'd want to be able to seek around in them and the like.  
If it were up to me I'd make files first-class objects and add a somewhat 
ANSI-C-like but improved set of builtins for creating and accessing 
them.  Of course, then you run into the problem that ColdC doesn't do 
mutable types other than through dbrefs (a good move if you ask me) and 
doesn't support objects with native code implementations (a bad idea) so 
one of those conditions must be changed or you'd be replicating file 
handles right and left.

(I also campaigned for connections as first-class objects, and yes, there 
is a theme here.  However, connections being the way they are is much 
better than files being the way connections are, since connections have 
so much less associated state.)

--
James "mutable" Deikun
owner of the `no-members' mailing list
</PRE>
