[bitc-dev] Problem: mutable literals

Swaroop Sridhar swaroop.sridhar at gmail.com
Fri May 19 01:26:24 EDT 2006


Jonathan S. Shapiro wrote:
> 1. Special case strings. Strings have constant members (no string-set!),
> and behave similarly to bignums. Strings are NOT a reference type.

I don't understand this. If strings are not a reference type, how can 
they be a value type?

That is, in order to write

(define (f x:string) ... ) on strings of all lengths, strings must be a 
reference type -- at least as a matter of representation. Right?


The problem with strings is that when we write

(define x:(mutable string) "xyz")

is it the case that x is mutable, or the contents of x is mutable?
Unlike vectors there is no clear way of specifying this.

Swaroop.


More information about the bitc-dev mailing list