home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / scheme / 2047 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  2.1 KB

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