Re: Pre-Scheme static allocation

Michael Sperber <[email protected]> Fri, 30 Oct 2015 08:54:13 +0100
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
Thomas Hintz <[email protected]> writes:

> What do you mean by a 'regular buffer'? Do you mean like 'make-string'?
> If so, is there another way to do something like that besides using
> make-string, make-vector, or allocate-memory? Those appear to always use
> a form of 'alloc' which ideally I wouldn't have to rely on. Or am I
> missing something entirely?

Ah, I'm beginning to understand: There's no way to allocate a writeable
buffer "on the stack" in PreScheme - Scheme has no way to restrict the
extent of that buffer.  Sorry ...

> (I realize now my original confusion was with the type inference making
> me think I could do something that doesn't make sense Scheme wise, even
> though it could from C.)

I think string literals can be read-only in C, too.

-- 
Regards,
Mike