Re: Candy Everybody Wants (was Re: Why do we need let?)



Abdulaziz Ghuloum wrote:
David Rush wrote:

Of course, R6RS doesn't *say* what the scope effects of the sequencing
version actually *ARE* nor does it provide a context-free way of
determining which sort of meaning is *intended* for a particular BEGIN
form.

Since when could you parse any Scheme in a context-free way?
What's the meaning of (foo) without knowing its surrounding
context?

So if you write a macro using BEGIN, it could, in fact have
different meaning in different contexts.

First off, I don't know what "write a macro using BEGIN" means.
I define macros using define-syntax and use them by name. Is
there another way?

Can you also shed some light with an example of the macro you
have in mind when you said that it has "different meaning in
different contexts"?

A typical kind of macro is the define-xyz macro, which may have to be expanded into a sequence of other define-xyz forms.

For example:

(define-macro (define-record name make test . fields)
`(begin
(define ,make
(lambda fields
(apply vector ',name fields))
(define ,test
(lambda (record)
(and (vector? record)
(eq? (vector-ref record 0) ',name))))
...))

define-record will have different meaning in different contexts.


Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
.



Relevant Pages

  • Vision Logic
    ... Meaning is context dependent ... cultural contexts so stressed by postmodernists (especially starting ... background contexts about which I consciously know very little. ... Vision -logic not ony can spot massive interrelationships, ...
    (talk.philosophy.misc)
  • Vision Logic
    ... Meaning Is Context Dependent ... background contexts about which I consciously know very little. ... and only by honoring multiple perspectives and multiple contexts can the ... Vision -logic not ony can spot massive interrelationships, ...
    (talk.philosophy.misc)
  • Re: from time to time
    ... > following contexts ... ... Its basic meaning in English is "occasionally"; ... > "The regulations from time to time in force..."? ... regulation at the applicable future time is effective. ...
    (alt.usage.english)
  • Re: NIP arrived.
    ... > change in meaning, when it is not. ... and the one excluding it is just as significant as the ... > traffic, some contexts might include the expected or typical traffic, ... > whilst other contexts might include the specific vehicles travelling ...
    (uk.rec.driving)
  • Re: Candy Everybody Wants (was Re: Why do we need let?)
    ... determining which sort of meaning is *intended* for a particular BEGIN ... different meaning in different contexts. ... I define macros using define-syntax and use them by name. ...
    (comp.lang.scheme)