Sunnan <email@example.com> wrote:
| Jeff Dalton <firstname.lastname@example.org> writes:
| > Why? Suppose I have a data structure with several fields.
| > Is it gross to have functions in two of them? I'm not sure
| > what you think the grossness is.
| Ok, so in CL, each and every variable is in essence a data structure
| with several fields, and convention has it that one of them is
| generally used for functions (i.e. the slot that's assigned with defun).
By the way, Perl is much like CL in this case -- every variable (symbol)
is in essence a data structure with several fields -- except that Perl
has chosen a particular reader macro character as an explicit indicator
of each slot:
$ for the scalar value binding, e.g., $foo
@ for the array value binding
% for the associative-array value binding
Capitalization for the I/O stream binding, e.g., FOO
* for "the symbol itself" (a.k.a. the "glob"), which
gives access to *all* of the bindings (and which is the
only way, AFAIK, to pass an I/O stream as a parameter).
Rob Warnock <email@example.com>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607