Re: What do we mean by "Identical" ?



On Sun, 30 Oct 2005 12:25:30 +0100, <newser.bbs@xxxxxxxxxxxxxxxxx> wrote:

Harald , I sincerely wish you have good time during your riding in the
warm breeze.
I think there is misunderstanding between us. I am not a pedagog. In
fact , I have confessed that I am new to lisp.

I believe that you are right that the arguments should be evaluated
before the calling of the function , but this still makes me more and
more confused . What do you think makes "eq" different from "eql"?
Following those procedures you taught me , I can't tell "eq" apart from
"eql".

Again , in "Practical Common Lisp" , Peter tells us that  "expression
(eq 3 3) can legally evaluate to either true or false" . Following your
procedures , I'm too foolish to see why it is possible for (eq 3 3 ) to
evaluate to false.

Many thanks if anyone can give me a hint !


NIL is always stored in the same place in memory. (or rather it is defined to behave as though it was) Same for T.

These are the ONLY elements with are guaranteed to have these properties.
The reason for nil having it is to make list prosessing more efficent I would think.
(Imagine the waste if each list had a unique nil element)


Also NIL is the ONLY object that does not inherit from T.

So.. any expression that does not evaluate to nil is T in Lisp generalized boolean.

(if 1 ..) gives the same result as (if 2 ...) or (if "hello" ...)
Expressions on the form nil, T, some number, a string are called self evaluating.
That is.. When 'called' during the parsing of the paramenters they return themselves.
Also a function call (func ..) is T unless it returns nil.



-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ .



Relevant Pages

  • Re: Implementing custom containers in Lisp
    ... CMU Common Lisp 18b, running on shell.xxx.com ... distinguish between immediate values and handles to heap objects, ... *all* integers are in fact BIGNUMs or equivalent, immutable objects on ... NIL ...
    (comp.lang.lisp)
  • Re: Predicate for lexical bindings
    ... I assume you mean that you have started up an interactive Lisp ... lower level of parse, sees the word "let" which sees there already ... but there's no symbol by that name (in the current package) so ... so it puts NIL into the CDR of that same CONS cell to ...
    (comp.lang.lisp)
  • Re: Advice for a new lisper
    ... This is my first experience with lisp, ... (defun simplify-card (card) ... unless return nil) ...
    (comp.lang.lisp)
  • Re: can someone explain this quote by Tim Daly?
    ... What's so special about nil and in the context of being a Lisp? ... Language design based on ... nothing contrived about saying that language designers do, in fact, ...
    (comp.lang.lisp)
  • Re: Why forth is not popular
    ... >> it would be very surprising if a production-quality Lisp system ... > (cdr nil), for example. ... SEGV trap handler can be an issue again. ... Douglas Johnson, Trap Architectures for Lisp Systems, pages 79-86, ...
    (comp.lang.forth)