Subject: Re: scheme seems neater
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 08 Apr 2004 03:42:59 -0500
Newsgroups: comp.lang.lisp
Message-ID: <D_ydnf94T58OjejdRVn_iw@speakeasy.net>
Sunnan  <sunnan@handgranat.org> wrote:
+---------------
| Jeff Dalton <jeff@todday.inf.ed.ac.uk> 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

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607