Number: 82 Date: 17-Mar-84 0':10':03 Submitter: roach.PA Source: Subject: Add Maclisp SETF to Record Package Lisp Version: Description: ' ' ' PROPOSAL TO INCORPORATE MACLISP SETF INTO RECORD PACKAGE' ' ' Quoted from a message from Stu Card to LISPSUPPORT':' "... FETCH and REPLACE calls to the record' package seem to be somewhat too long and thereby tend to discourage' use of the record package and make the code read less cleanly (and' take more screen space) than might othersie be achieved. The general' argument is that a programming language ought (like any language) have' relatively efficient symbols. Frequently used constructs ought to' have short names (emphasizing typing efficiency), infrequently used' names ought to be very mnemonic (emphasizing remembering efficiency).' The FETCH and REPLACE constructs in the record package would have' fulfilled this principle if used in their X':FOO and X':FOO←Y forms.' Unfortunately, a number of other things work against the use of these' forms (e.g. the embedded characters violate the LISP notion of an atom' and mean that, in addition to ascetic problems that editors, etc. that' process such forms must have specialized primitives). In accord with' a general reaction to certain CLISP constructs that increase the' complexity of the system by violating general LISP conventions, the' system now translates these into (FETCH FOO OF X) and (REPLACE FOO OF' X WITH Y). But these long expressions do not follow the above' efficiency principle (they add 12 and 15 extra characters, as opposed' to the 1 and 2 extra of the CLISP form). Therefore they seem awkward' to write. I have been complaining about this fact for about 8 years' now."' I agree with this paragraph of Stu''s message. I''ve' proposed a few times that Interlisp adopt the MACLISP''s well' established SETF macro. This can be done in an upward compatible way,' and as a matter of fact, has been done, and is available as' {PHYLUM}<LISP>LIBRARY>SETF, SETF.DCOM, & SETF.TTY. The SETF record' accesses do not compare unfavorably with Stu''s forms':' ' SETF Stu''s "':" & "←"' (r.f d) (': (r f) d)' (SETF (r.f d) v) (← (': (r f) d) v)' ' I haven''t provided functions for extracting "r" and "f" from "r.f" (I' haven''t needed them), but they would be easy to produce. SETF also' may be used outside the record package':' ' (SETF (CAR x) y) => (RPLACA x y)' (SETF (CDR x) y) => (RPLACD x y)' (SETF (ELT x i) y) => (SETA x i y)' ' ' I am able to use the record package without any modifications other' than the availability of forms "(r.f d)" and "(SETF (r.f d) v)". I''ve' been using versions of my SETF package routinely on a day-to-day basis' for the past year and a half without problems.' Workaround: Test Case: Edit-By: Sannella.PA Edit-Date: 17-Apr-84 11':38':57 Attn: Assigned To: In/By: Disposition: ' [Date': 13 Apr 84 11':45 PST' From': Masinter.pa' Please mark AR#82, "Add MacLisp SETF to Record Package" declined. I''m willing to entertain a "Want COMMON LISP COMPATIBILITY PACKAGE" Wish, and any specific ARs on the "change" feature (which is basically the same, and already in Interlisp-D.)] System: Programming Environment Subsystem: Record Package Machine: Disk: Microcode Version: Memory Size: File Server: Server Software Version: Difficulty: Frequency: Impact: Priority: Status: Declined Problem Type: Source Files: