Subject: Re: Your introduction to Lisp...
From: Erik Naggum <>
Date: Wed, 10 Apr 2002 09:32:06 GMT
Newsgroups: comp.lang.lisp
Message-ID: <>

* Arjun Ray <>
| And using funcall appropriately, or have I misunderstood?  

  Well, funcall or apply, as appropriate.

| I'm still having trouble grasping whether CL has two namespaces or many.

  Well, there is a crucial difference between Scheme and Common Lisp here
  that I think many people miss.  We have talked about symbolic programming
  and how it relates to packages in this newsgroup a while, but the obvious
  point that "everything" in Common Lisp is named by symbols is somehow
  lost on people.  When a class is named by a symbol, it may or may not be
  a separate "namespace" for classes, but the fact that a symbol may be a
  designator for the class so named may be an indicator.  In Scheme, they
  are still so fascinated by this "first-class" idea that they think they
  have to pass the values around instead of names.  This makes for a _very_
  different mode of thinking.

| Function versus variable is pretty clear, but what about special forms,
| macros, keywords, filler (syntactic sugar), and the like?

  Actually, it is operator vs variable -- the first position of a form
  names an operator.  (The function slot of a symbol may also hold more
  than functions.)  That an variable may be named the same as a operator
  means that you have two namespaces, not just "one valuespace", which I
  think is a better name for Scheme and that whole branch of programming
  languages starting with Algol which Scheme tried to merge with Lisp.

| In my limited understanding, one would exploit syntax to differentiate
| namespaces, so I guess I'm really asking, how many syntactically
| distinguishing markers does CL have and does/should it need more?

  No, syntax is not the issue.  The issue is that a symbol names various
  forms of things.  Whether they are "in" the symbol, like the functional
  and the regular values, or are keys for lookups elsewhere is immaterial.
  What find-class does is not specified, except to take a symbol as a value
  and return the class so named.  There is no syntax for block names, throw
  tags, go labels, etc, but these are all established and used in special
  forms, which I guess _some_ would call "syntax", but it is not really
  visually different from other forms.  I therefore think it is not very
  productive to call them namespaces.  It is more like operator-specific
  mappings of symbols that name their specific things.

  But in general, using symbols to name things is the (Common) Lisp way,
  and using the values directly is the Scheme way.

  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.

  Post with compassion: