[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Backquote idioms

    Date: Wed, 22 May 85 11:54 EDT
    From: David C. Plummer in disguise <DCP@SCRC-QUABBIN.ARPA>

	Date: Wednesday, 22 May 1985, 10:56-EDT
	From: Guy Steele <gls%AQUINAS@THINK.ARPA>

	```(,@',,@q)				;Alan's example
	(QUOTE (3 5) (4 6))
	<error>		;but would be sensible if Q were the singleton list (R),
			    ; in which case third evaluation would produce (3 5).

	Do you all believe these?

    Does it matter?  RWK said he has never used a triple backquote.  Neither
    have I.  There may be applications which are really good hacks, but can
    they be maintained?  Even some double nested backquotes require enough
    though that they should probably be avoided.  Conciseness and
    compactness does not imply clarity and robustness.

 From LMFS:DEFSTORAGE (part of PL/I record simulating substrate of File System):

(defmacro once-onlify-index-offset (form)
  (let ((do-it-p (gensym))
	(was-ixo (gensym))
	(ggs (gensym)))
    `(let ((,do-it-p (not (atom *defstorage-index-offset*)))
	   (,was-ixo *defstorage-index-offset*))
       (let-if ,do-it-p				;Guaranteed needs wrapping now.
	       ((*defstorage-index-offset* '',ggs))
	 (wrap-if (symbolp ,was-ixo)		;Needs once-onlying at macro time.
		  `(once-only (,,was-ixo) ,:the-form)
		  (wrap-if ,do-it-p
			   ``(let ((,',',ggs ,,,was-ixo)) ,,:the-form)

Admittedly, now that there are "language tools", this can be done better.

Also, idioms like

and the like should be discussed.  I have always been amused by
the analogy to tensor subscripts and superscripts and their
contraction rules.