Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!oliveb!pyramid!decwrl!labrea!russell!gandalf From: gandalf@russell.STANFORD.EDU (Juergen Wagner) Newsgroups: comp.lang.lisp Subject: Re: CL question - conditional list elements Message-ID: <2002@russell.STANFORD.EDU> Date: 27 Jan 88 23:44:57 GMT References: <1350005@otter.HP.COM> Reply-To: gandalf@russell.stanford.edu (Juergen Wagner) Organization: Center for the Study of Language and Information, Stanford U. Lines: 23 Conditional elements in lists (which can be determined at compile time) are easy to write using the backquote syntax: `(bit1 bit2 ,(and (need-bit3) 'bit3) bit 4 bit5 ,(and (need-bit4) 'bit4) bit5 bit6) I assume, you are aware of this possiblility. However, if you are intending to sort of tag list elements to restrict their visibility, and to make the accessibility of list elements context dependent, this should be handled in an application-dependent way inside the menu handler, or whatsoever used to interprete these lists. Lists changing from context to context (in particular, without external operations being performed) can cause severe inconsistencies in your program. Imagine taking the (conditional) Car of a list into a temporary variable. Then you call a function, then another one. The validity of the isolated Car is questionable after the first call. Therefore, I suggest to leave such problems up to the application. -- Juergen Wagner, gandalf@Russell.Stanford.edu Center for the Study of Language and Information (CSLI), Stanford CA