Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!europa.eng.gtefsd.com!uhog.mit.edu!bloom-beacon.mit.edu!crl.dec.com!crl.dec.com!lead.zk3.dec.com!mets86.mse.tay.dec.com!jrd.dec.com!news.dec-j!wnoc-sfc-news!wnoc-tyo-news!aist-nara!wnoc-kyo-news!atrwide!atr-hr!atr-hr!bfox
From: bfox@hoshi.hip.atr.co.jp (Brian J. Fox)
Subject: Re: why no substring sharing?
References: snark@bark.COM (Impatient Observer) <9411262226.AA13273@bitsy.MIT.EDU>
Date: Tue, 29 Nov 1994 10:18:21 GMT
Organization: ATR Human Information Processing Research Labs., Japan
Sender: news@hip.atr.co.jp (USENET News System)
In-Reply-To: snark@bark.COM's message of 26 Nov 1994 17:27:13 -0500
Message-ID: <BFOX.94Nov29191821@hoshi.hip.atr.co.jp>
Lines: 32


   From: snark@bark.COM (Impatient Observer)
   Date: 26 Nov 1994 17:27:13 -0500
   NNTP-Posting-Host: bloom-beacon.mit.edu

   > schwartz@galapagos.cse.psu.edu (Scott Schwartz) writes:
   > Organization: Penn State Comp Sci & Eng
   >
   > Why does substring return a newly allocated string?
   [ and similar related questions ]

Geeze, stop flaming this guy just because he wants displaced arrays.
That is a reasonable language feature to want, and he might just get it.

   Because strings in Scheme, like vectors, have an object header which
   contains their type code and length. To make every substring of a string
   carry this kind of information would be wasteful. If you want this sort of
   behavior you can always use string->list to get back a list of characters
   which you can then hack as you detailed.

While it is true that displaced arrays require an additional header,
it isn't clear that any particular use of them is `wasteful'.

   [ some yelling deleted ]
   you don't want the wrath of countless irrate Scheme wizards blazing through
					 ^^^^^
   And there are no ``a''s in ``primitive'', asshole.

People who live in glass houses shouldn't throw stones.  "Irate" is
not spelled with two `r's.

Brian Fox
