Sujet : Re: on racket and other Lisps
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.lispDate : 02. Jun 2024, 07:10:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240601220456.156@kylheku.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-06-01, Lawrence D'Oliveiro <
ldo@nz.invalid> wrote:
On Sat, 01 Jun 2024 10:23:53 -0300, Julieta Shem wrote:
>
What's your definition of homoiconicity?
>
The AST can be represented in language objects.
Good guess, now go look it up.
Homoiconic refers to storing the program in the same representation that
the programmer works with.
The POSIX shell is homoiconic because funtions can be listed using
the "set" command, with no arguments. They appear in the same form,
modulo reformatting.
In Common Lisp, the ED function, an optional feature, support for
whcih is implementation-defined, provides homoiconicity.
ED can be used to edit the textual representation of a function.
The 1960's TRAC project in which "homoiconic" originated similarly
had definitions that could be recalled at run-time and edited.
Line-numbered BASIC, like what appeared on 8 bit microcomputers
in the 1970s and 80s, is also homoiconic. The lines of the program
can be listed and edited. (They are typically tokenized, so not
stored exactly as entered, but it still lands under homoiconic.)
"Homoiconic" is a tangential, useless concept in the code-is-data
debate, which is exhibited by low-brow garbage languages like BASIC and
POSIX shell.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca