Re: XS: possible to have side effects?

Subject: Re: XS: possible to have side effects?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxx>
Date: Sun, 08 Jun 1997 14:09:41 -0400
Please pardon my confusion, but I'd like to ask something about this.

At 13:34 97/06/08 +0700, you wrote:
>given
>
>  (define x (let ((n 0)) (lambda () (set! n (+ 1 n)) n)))
>
>repeated calls to (x) will return 1, 2, 3,...

Then doesn't calling this routine create a side effect?  The return value
isn't deterministic based on one's location within a grove.

This concerns me from a debugging point of view ... I've been under the
belief that each construction rule is independent of all other construction
rules.  Won't the above now introduce variability that isn't repeatable and
then, perhaps, difficult to debug?

Thanks ............ Ken



--
G. Ken Holman            mailto:gkholman@xxxxxxxxxxxxxx
Crane Softwrights Ltd.  http://www.CraneSoftwrights.com
1605 Mardick Court, Box 266,         V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0         F: +1(613)489-0995
PGP Privacy: http://www.cyberus.ca/~holman/gkholman.pgp

 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread