home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!anarres.CS.Berkeley.EDU!bh
- From: bh@anarres.CS.Berkeley.EDU (Brian Harvey)
- Newsgroups: comp.lang.scheme
- Subject: Re: Re^2: random rant on random files
- Date: 18 Aug 1992 15:41:20 GMT
- Organization: University of California at Berkeley
- Lines: 31
- Message-ID: <16r5n0INN4n2@agate.berkeley.edu>
- References: <700@data.rain.com> <16ocv6INNl87@agate.berkeley.edu> <701@data.rain.com>
- NNTP-Posting-Host: anarres.cs.berkeley.edu
-
-
- Okay, so what do I do if I want to write a new file from scratch?
- I don't want to create a store, buffer it in a temp file on disk,
- and then finally copy it to the filename I really meant. (That's
- what I was trying to ask about copying.)
-
- The part about unsigned-integers-only seems a little user-unfriendly
- to me. To make this work in a way that would be both convenient and
- Schemely, it seems to me (thinking about it off the top of my head)
- that we'd need -- dare I say it -- first-class types! Then you could
- say (datum->store <datum> <type> <store-addr>) and
- (store->datum <type> <store-addr>). You'd want the first-class type
- mechanism to include user-defined ADTs as well as the primitive types.
-
- I mean, how does someone write a bignum into a store? This seems
- way too hairy for a simple-minded programmer like me; I'd rather
- do the I/O in C! (Which I hate, if that wasn't obvious.)
-
- Alternatively, maybe every primitive type has to have an unambiguous
- binary representation the same as it has a print form, and instead of
- explicitly mentioning types you just leave that argument out and
- Scheme figures it out. That would mean, though, tagging everything
- in the store with its type.
-
- I'm feeling a little disorganized about this message, but it's because
- I'm really struggling to make sense of the whole idea. I mean, files
- just feel very different from memory to me. I know that at some level
- of abstraction they're the same, but they perform quite differently.
- I don't understand [I'm not being sarcastic] the principle of language
- design whereby symbols and strings are treated separately but files
- and memory are treated the same.
-