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

Re: [Scheme-reports] Formal Response #382: Allow "if" to accept arbitrarily many if-then pairs



On Thu, 11 Oct 2012 22:52:42 -0400, John Cowan <cowan@x> said:
> IF is a symbol in the CL package, and attempts to rebind or redefine symbols
> in that package don't work.  So you need to create a symbol in some other
> package by saying (shadow 'if), which forces the current package to contain
> a separate IF symbol unrelated to CL:IF.  You can then define that
> however you want.

  By the way, another option is to create one's package so that it
  does not use the COMMON-LISP package, and then there will be no need
  to shadow anything.  Obviously, this is most useful when there are
  many symbols which would otherwise have to be shadowed, and few
  symbols which need to be explicitly imported or written with a
  package prefix.

  Another off-topic point is that after (SHADOW 'IF), CL:IF and IF in
  the current package will be two completely different symbols (and
  thus not EQL, for example).  They will just have the same print name
  and look deceivingly similar when printed.

  ---Vassil.


-- 
Vassil Nikolov | Васил Николов | <vnikolov@x>

"Be careful how you fix what you don't understand."  (Brooks 2010, 185)

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports