This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SRFI-17


> From: Clark McGrew <mcgrew@ale.physics.sunysb.edu>
> 
> >>>>> "Keith" == Keith Wright <kwright@gis.net> writes:
> 
>     >> From: Mikael Djurfeldt <mdj@mdj.nada.kth.se>
>     >> 
>     >> Could some bright people please join Per Bothner and Michael
>     >> Livshin in defending our generalized syntax for `set!' in the
>     >> discussion about SRFI-17.
> 
>     Keith> It seemed to me that the discussion fell into two parts
>     Keith> [...]
> 
> As far as your proposal goes, I'd prefer you remove the "(setf! x 42)
> is an error" clause and extend the macro to accept it.

That's not hard to do, but it requires adding to the macro, not just
defining a setter procedure.  I regard that fact as evidence that
it should not be done.  But if you want to make that change and call
it SRFI-17B, go ahead.  It's not really "my proposal" in any sense.

My purpose in writing SRFI-17A was not to make a new proposal,
but to make the original proposal as clear and attractive as
possible in the light of the subsequent discussion.

Clark> I can understand the argument that it's bad to change
Clark> the fundamental language syntax, but find the argument
Clark> that set! and set-car! are conceptually quite different
Clark> to be less than compelling.

In addition to the two parts of the discussion I identified in
my previous post (i.e. 'raving' and 'good points') I think we
need to add 'irreconcilable differences'.

Thesis: SET! and SET-CDR! are entirely different types.
Proof: SET-CDR! is a procedure, while SET! is essential syntax.
 This is not a simple blunder, or easily changed.  The 
 expression (SET! X 42) can not be a procedure call, because
 procedures are called by passing the values of the arguments,
 and the value of X is irrelevant to the meaning of the expression.

Antithesis: SET! and SET-CDR! are two instances of the same type.
Proof: Both are described, informally and in the formal semantics,
 as storing a value into a location.  In one case the location
 is bound to an identifier, in the other case it is part of a value,
 but the same operation is performed in either case.

> Immanuel Kant (Critique of Pure Reason, Second Division, Book II,
>   Chapter II, Section 2 "Antithetic of Pure Reason") writes:

Kant> These apparently rational, but really sophistical
Kant> assertions open a dialectical battle-field, where that
Kant> side always obtains the victory which is allowed to
Kant> make the attack, and where those must certainly succumb
Kant> who are obliged to keep on the defensive.  Hence
Kant> doughty knights, whether fighting for the good or the
Kant> bad cause, are sure to win their laurels, if only they
Kant> take care that they have the right to make the last
Kant> attack...  As impartial judges we must take no account
Kant> of whether it be the good or the bad cause which the
Kant> two champions defend.  It is best to let them fight it
Kant> out between themselves in the hope that, after they
Kant> have tired rather than injured each other, they may
Kant> themselves perceive the uselessness of their quarrel,
Kant> and part as good friends.

-- 
     -- Keith Wright  <kwright@free-comp-shop.com>

Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com>
         ---  Food, Shelter, Source code.  ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]