Re: GC in Jon's raytracing benchmark



"Rob Thorpe" <robert.thorpe@xxxxxxxxxxxx> writes:
> Joe Marshall wrote:
> > Huh? Nearly any object created with defstruct or defclass has pointers.

> I don't know about defclass, but defstruct is a macro that uses cons
> cells and symbols internally isn't it?

Huh? You've been reading a paper from a 1970'ies Lisp or what? You
know, thoses Lisps that only knew CONS, FIXNUM, SYMBOL types and where
(CDR <some-symbol>) would get to its property list, which would of
course also hold the symbol's print name. :)

Try DISASSEMBLE in a Common Lisp with a native code compiler.

Did you ever use DEFSTRUCT without its TYPE option?

Actually, you're completely right: any macro uses cons cells and
symbols internally for the simple reason that it must expand to
another Lisp expression. It is common knowledge that these are mostly
made of cons cells and symbols, backquote (for the non-purists) and a
few minor data types named atoms but not otherwise worth mentioning. :-)

Regards,
Jorg Hohle
Telekom/T-Systems Technology Center
.



Relevant Pages

  • Re: When is Xah going to ease up on Emacs...
    ... and the notion of head also appear in lisp. ... is still a tree or a nested list. ... So, suppose you invented a lisp language, so that there's no cons, but ... So this means, in this language the head, or non-leaf nodes of a tree, ...
    (comp.lang.lisp)
  • Re: question about Clojure immutable structures
    ... for the avoidance of doubt: should a Lisp do this? ... and rich tradition. ... One aspect of this tradition is that CONS builds a ... than lists printing as lists, or the existence of two distinct `false' ...
    (comp.lang.lisp)
  • Re: List diagrams -- Siebel and Touretzky draw them differently
    ... Perhaps someone with such a lisp can comment. ... Next relase ofECLis going to support two word conses ... It also simplifies a lot the code for the garbage collector, ... using two-words for a CONS does two things for you. ...
    (comp.lang.lisp)
  • Re: When CANNOT use first/rest in place of car/cdr?
    ... >> to run ancient LISP code? ... a cons cell has no REST; ... I use CAR/CDR to emphasize the view as a cons qua cons. ... I think a belief that all conses are lists, that is, that ...
    (comp.lang.lisp)
  • Re: Java is going to have closures.
    ... This method is from a very popular piece of Lisp software. ... You can see that this method can take a cons as the first argument. ... Nothing in the surrounding definition tells me what value-defs is. ... step you usually don't need to perform in a statically typed language. ...
    (comp.lang.lisp)