home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!apple!voder!woodstock!news
- From: dyer@eagle.sharebase.com (Scot Dyer)
- Newsgroups: comp.lang.scheme
- Subject: Re: random rant on random files
- Message-ID: <1992Aug21.225943.24842@sharebase.com>
- Date: 21 Aug 92 22:59:43 GMT
- References: <9208130624.1.11214@cup.portal.com> <700@data.rain.com> <TMB.92Aug18171257@arolla.idiap.ch> <704@data.rain.com> <TMB.92Aug20181314@arolla.idiap.ch>
- Reply-To: dyer@eagle.sharebase.com (Scot Dyer)
- Organization: NCR/ShareBase Corporation
- Lines: 47
- Nntp-Posting-Host: eagle
-
- In Article 1737: (from Thomas M. Breuel)
- > >What is wrong with binary streams?
- >
- > Nothing. But Scheme is not a store description language (like C/C++),
- > and does not have a binary interface defined. [...]
-
- >It is also trivial to build a store interface on top of binary
- >streams. One question is what the language should provide. I'd prefer
- >to see it provide binary streams, not stores, since I feel that binary
- >streams are more general.
-
- In the intrest of generality, it might be a good idea to implement 'streams' as
- vectors of the code that should be used for various low-level operations, like
- #( write-object-to-stream
- read-object-from-stream
- get-position
- set-position
- close-stream
- user-slot )
-
- On top of this 'stream' object could be built all of the functions being talked
- about. I like this solution since it provides utmost generality. A 'stream
- type' vector could be made to represent binary contents of memory*, another for
- a local file, another for a remote file, etc. The difference would be in how
- the file was opened...
-
- I'm sure that the fields listed above are incomplete and assume a more rigid
- model of streams than scheme really needs, but more fields could be added.
- Mostly this would mean adding to Scheme:
-
- 1) A few 'open file' functions that provide the appropriate vectors.
- (And therefore the low-level 'slots' or 'functions' required for
- this, even if they're left anonymous)
- 2) An abstracted set of file manipulating functions that will work
- with any of these files.
- 3) A constructor for new stream-type-vectors (perhaps
- (stream-vector...)?)
-
- Of course, any object-system added to scheme (if one ever comes along) should
- be used to implement files instead of a simple vector...
-
- Anyway, just my $.02 cents worth.
-
- -- Scot
-
- --
- * provided functions for converting from exprs to binary and vice versa...
-