From: Christopher C. Stacy
Subject: Re: reflection
Date: 
Message-ID: <ueld4d2l8.fsf@dtpq.com>
>>>>> On Fri, 9 Aug 2002 15:55:33 -0400, Saverio Perugini ("Saverio") writes:
 Saverio> What is the `hello world' of reflection in lisp or common lisp?
 Saverio> I mean `hello world' in the metaphorical sense of the phrase here.

Lisp programs are composed of the most primitive Lisp data elements, 
so the language is naturally reflective (that is, programs can dynamically:
inspect themselves, write code, redefine themselves, and so on).

In practice, most applications don't need that level of reflection,
and the source programs are compiled away, and the program evaluator
is not explicitly used at runtime.   However, even without their own
source code, and without composing new programs while running, there
is still considerable inspection power available at runtime.
For example, queries can still be made about whether symbols and other
types of objects represent program elements, such as functions and variables.
All Lisp data has identity, and Lisp has runtime type and type-graph
inspection, and dynamic dispatch.  Also, the object-oriented (class
and method) features include a powerful "meta-object protocol".

So, here's a "hello world" Common Lisp program for you:

  (functionp (function functionp))

From: Jeff Greif
Subject: Re: reflection
Date: 
Message-ID: <W_Y69.34280$983.50214@rwcrnsc53>
or (describe #'describe)

"Christopher C. Stacy" <······@dtpq.com> wrote in message
··················@dtpq.com...
> >>>>> On Fri, 9 Aug 2002 15:55:33 -0400, Saverio Perugini ("Saverio")
writes:
>  Saverio> What is the `hello world' of reflection in lisp or common
lisp?
>  Saverio> I mean `hello world' in the metaphorical sense of the phrase
here.
>
>
...
> So, here's a "hello world" Common Lisp program for you:
>
>   (functionp (function functionp))
From: Rahul Jain
Subject: Re: reflection
Date: 
Message-ID: <87ptwjwnsw.fsf@localhost.localdomain>
"Jeff Greif" <······@spam-me-not.alumni.princeton.edu> writes:

> or (describe #'describe)
> 
> "Christopher C. Stacy" <······@dtpq.com> wrote in message
> ··················@dtpq.com...
> > So, here's a "hello world" Common Lisp program for you:
> >
> >   (functionp (function functionp))

Ok, I'll bite.

(class-of (find-class 'standard-class))

-- 
-> -/                        - Rahul Jain -                        \- <-
-> -\  http://linux.rice.edu/~rahul -=-  ············@techie.com   /- <-
-> -X "Structure is nothing if it is all you got. Skeletons spook  X- <-
-> -/  people if [they] try to walk around on their own. I really  \- <-
-> -\  wonder why XML does not." -- Erik Naggum, comp.lang.lisp    /- <-
|--|--------|--------------|----|-------------|------|---------|-----|-|
   (c)1996-2002, All rights reserved. Disclaimer available upon request.
From: Vijay L
Subject: Re: reflection
Date: 
Message-ID: <1eaf81aa.0208160435.6bb0ff76@posting.google.com>
* Christopher C. Stacy
| (functionp (function functionp))
* Jeff Greif
| (describe #'describe)
* Rahul Jain
| (class-of (find-class 'standard-class))

My turn:
(documentation 'documentation 'function)

Thanks,
Vijay L
From: Vijay L
Subject: Re: reflection
Date: 
Message-ID: <1eaf81aa.0208161151.2a9c8a85@posting.google.com>
* Christopher C. Stacy
| (functionp (function functionp))
* "Jeff Greif" <······@spam-me-not.alumni.princeton.edu> writes:
| (describe #'describe)
* Rahul Jain 
| (class-of (find-class 'standard-class))

sorry for not posting this with the previous one:

(apropos 'apropos)

Thanks,
Vijay L