Subject: Re: First-class symbols (Re: Why is Scheme not a Lisp?) From: Erik Naggum <erik@naggum.net> Date: Sat, 16 Mar 2002 11:29:40 GMT Newsgroups: comp.lang.lisp Message-ID: <3225266991598821@naggum.net> * Erann Gat | Yes: | | (symbol-value x) == (eval x (interaction-environment)) | (set x v) == (eval `(set! ,x value) (interaction-environment)) | | > Can you call a symbol in Scheme if its global value is a function? | | Yes: | | ((eval f (interaction-environment)) arg1 arg2 ...) | | or | | (define (function f) (eval f (interaction-environment))) | ((function f) ...) And you guys have a problem with _funcall_!? *laugh* | So this is what I am struggling to understand. I have always thought | that interned-constant-string is the "essence of symbolness". Huh? How odd. That is the essence of keyword symbols, Scheme symbols. | Whether symbols are mapped to values by having those values be "part of" | the symbol as in CL, or through a separate environment object as in | Scheme, seems to me at least on a practical level to be a relatively | minor detail. How can you be convinced that it has major ramifications? | What do you see as the value (in the economic sense) of a symbol in the | Lisp sense of the word? The same value I see in a word: _meaning_. Scheme symbols lack meaning. They are names, but they name -- nothing. Some people think words are just names, too, that the _only_ property a word has is its spelling (some of the more "creative" spellers not even that), and each word has meaning only according to the person you ask. That looks like a Scheme view to me. I believe a saner approach is to consider a word to have a life of its own, independent of the individual user, but created as a community effort as a common reference intended both to carry meaning and to facilitate communication and understanding. Some people believe that words give us the ability to think abstractly about ideas that are far too complex to grasp concretely, even ideas that have no concrete meaning. | What can you do with a Lisp symbol that you can't do with a Scheme symbol? Use it as a designator for a function or a class or even a string. Ask it about its home package. Use its property list. Unintern it and still keep it around. Copy it, optionally including its values. Have you never used symbols in Common Lisp, except to name lexical variables? If you have only used the "Scheme-compatible subset" of Common Lisp, Erann, I suddenly understand why you think the way you do about Common Lisp. It also dawns on me, belatedly, that this follows from Paul Graham's attempts to re-create several Scheme features in Common Lisp with On Lisp -- and why he needs Arc and could _not_ use Common Lisp as his implementation vehicle. | The only thing I can think of, even in pre-R5RS scheme, is computing the | dynamic binding of a symbol whose identity is not known until run time. Well, interactive environments, "little languages", etc, seem to be _very_ different things in Scheme and Common Lisp. You can probably find some useful information in this difference. /// -- 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.