Subject: Re: Scheme implementation in C++
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 19 Oct 2000 03:49:31 GMT
Newsgroups: comp.lang.scheme
Message-ID: <8slr0b$b2qql$1@fido.engr.sgi.com>
Timo K Suoranta  <tksuoran@cc.helsinki.fi> wrote:
+---------------
| Christopher Browne <cbbrowne@news.hex.net> wrote:
| > a) The implementation of garbage collected memory management, where
| 
| Easy to implement with OOP. Budd's version uses simple reference
| counting, but I might upgrade it to something nicer when I get it
| working first.
+---------------

Yeah, be sure to do that, 'cuz simple reference counting fails to
collect sets of mutually-referential objects (cyclic graph structure).

+---------------
| I still might want to replace stdio with iostream, and c strings
| with std:strings.
+---------------

Remember that Scheme strings are "counted", not terminated by nulls:

	> (define str (apply string (map integer->char '(97 98 0 99 100))))
	> str
	"abcd"
	> (string-length str)
	5
	> (string->list str)
	(#\a #\b #\nul #\c #\d)
	> 


-Rob

-----
Rob Warnock, 31-2-510		rpw3@sgi.com
Network Engineering		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		PP-ASEL-IA
Mountain View, CA  94043