[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calling a function with undefined symbol
From: |
Heime |
Subject: |
Re: Calling a function with undefined symbol |
Date: |
Mon, 31 Oct 2022 09:43:57 +0000 |
------- Original Message -------
On Monday, October 31st, 2022 at 9:24 AM, Jean Abou Samra <jean@abou-samra.fr>
wrote:
> > Le 31 oct. 2022 à 09:59, Heime heimeborgia@protonmail.com a écrit :
> >
> > Yes, I have got really confused about what symbols are exactly. Even
> > after reading several times. I have never seen anybody make a symbol,
> > only variables. So, what is a symbol?
>
>
>
>
> Imagine parents who are planning to have a child and decide they will call
> it, say Deborah. They will say things like “I like the name Deborah better
> than Mary”. Those are sentences about the names themselves, not some
> children. The names don’t need children in order to exist as words. Then, the
> child is born and sentences like “Deborah weighs 3kg” (referring to the child
> named Deborah) start to make sense.
>
> When you do 'symbol in Lisp, this gives you a bare name, or a “symbol”. With
> symbol-value, you get what value is associated with this symbol, if any (the
> child with that name). But you don’t need a value bound to the symbol (a
> child called Deborah) before you start using the symbol itself (the name
> “Deborah”).
The Lisp manual says that a symbol is an object with a name. Then a variable
(setq thevar 4) has an associated symbol 'thevar.
And the function "(defun thefun ()" also has an associated symbol "'thefun".
Furthermore one can make just a symbol, let us say 'go,
which can be passed as an argument to a function "(defun mbcomplt (arg)" using
(mbcomplt 'go). Then inside the function on can test
whether the symbol exists with (eq arg 'go). Even though we only have a name
without a values. Is this a good basic understanding
of a symbol?
- Calling a function with undefined symbol, Heime, 2022/10/31
- Re: Calling a function with undefined symbol, Jean Abou Samra, 2022/10/31
- Re: Calling a function with undefined symbol, tomas, 2022/10/31
- Re: Calling a function with undefined symbol, Heime, 2022/10/31
- Re: Calling a function with undefined symbol, tomas, 2022/10/31
- Re: Calling a function with undefined symbol, Jean Abou Samra, 2022/10/31
- Re: Calling a function with undefined symbol,
Heime <=
- Re: Calling a function with undefined symbol, Jean Abou Samra, 2022/10/31
- Re: Calling a function with undefined symbol, Heime, 2022/10/31
- RE: [External] : Re: Calling a function with undefined symbol, Drew Adams, 2022/10/31
- Re: [External] : Re: Calling a function with undefined symbol, Emanuel Berg, 2022/10/31
Re: Calling a function with undefined symbol, Stefan Monnier, 2022/10/31
Re: Calling a function with undefined symbol, Emanuel Berg, 2022/10/31