Subject: Re: DSSSL side effect-freeness From: Harald Hanche-Olsen <hanche+dsssl-l@xxxxxxxxxxxx> Date: Tue, 27 Jan 1998 22:22:06 +0100 |
- "G. Ken Holman" <gkholman@xxxxxxxxxxxxxx>: | At 14:06 98/01/27 +0900, Frank A. Christoph wrote: | >It seems very odd to me that a language which has been so | >conscientiously purged of side effects is nevertheless call-by-value. | | But wouldn't it be necessary to be call-by-value? Call-by-reference | would (I think) blatantly allow potential side effects. If the | calling routine called a subroutine using call-by-reference, then | the subroutine could have incredible side effects on the variable | being passed. Only if the language had primitives for mutating whatever is referenced, which the DSSSL language doesn't. And without such primitives, I don't see that there is any difference, from the point of view of the programmer, between call-by-value and call-by-reference! In fact, in the absence of side-effects, the implementor is free to use call-by-reference if he so wishes, and he might well wish to for efficiency reasons. Only he might not call it call-by-reference, but rather think of it as there being no need to duplicate information that is not going to be mutated anyway. Or, since calling the same procedure twice with the same arguments in the same context will always yield the same result, the implementor is free to cache results and simply return the cached result the next time around. | [...] but as I said above, I'm not a language theorist Neither am I. Pretty soon now, some such is going to come out of the woods and shoot both our arguments to pieces. Such is life. - Harald DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: DSSSL side effect-freeness, G. Ken Holman | Thread | Re: DSSSL side effect-freeness, Paul Prescod |
Re: DSSSL side effect-freeness, G. Ken Holman | Date | SGML to HTML with DSSSL, Paul Prescod |
Month |