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

historical question about CASE



    Date: Fri, 5 Jun 1987  16:11 EDT
    From: SOLEY@xx.lcs.mit.edu

	(defmacro do-something (thing &key allow-list ignore-list complain-list)
	  `(case ,thing
	     (,allow-list (frob-thing ,thing))
	     (,ignore-list nil)
	     (,complain-list (error "I won't frob ~S!" ,thing))))

    Silly Programmer, hacks are for kids.  That's no reason.

    (defmacro do-something (thing &key allow-list ignore-list complain-list)
      (append `(case ,thing)
	      (if allow-list `((,allow-list (frob-thing ,thing))))

	      .. etc ..
      ))

I don't know about you, but I find mine much easier to read.

						barmar