Re: DSSSL side effect-freeness

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
  • DSSSL side effect-freeness
    • Frank A. Christoph - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id AAA21877Tue, 27 Jan 1998 00:01:20 -0500 (EST)
      • G. Ken Holman - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id JAA00629Tue, 27 Jan 1998 09:44:17 -0500 (EST)
        • Harald Hanche-Olsen - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id QAA03547Tue, 27 Jan 1998 16:26:24 -0500 (EST) <=
          • Paul Prescod - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id TAA10715Tue, 27 Jan 1998 19:42:59 -0500 (EST)
      • Paul Prescod - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id TAA10659Tue, 27 Jan 1998 19:42:27 -0500 (EST)
      • <Possible follow-ups>
      • Frank A. Christoph - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id AAA12305Wed, 28 Jan 1998 00:06:25 -0500 (EST)
        • Pierre Mai - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id OAA22416Wed, 28 Jan 1998 14:15:53 -0500 (EST)