|
Subject: Re: On side effects From: "James Clark" <jjc@xxxxxxxxxx> Date: Thu, 19 Jun 1997 11:10:41 +0700 |
> My big concern about modes (first class or otherwise) is that they don't
> seem to nest the way I would expect them to:
>
> (element foo (...) )
>
> (mode bar
> (element foo (...))
> (element qutz (with-mode baz (process-matching-children "baz"))))
>
> (mode baz
> (element baz (process-matching-children "foo"))
>
> If I call (with-mode bar) which calls (with-mode baz) I want the
> definition for "foo" from "bar". I want construction-rules to overwrite
> each other in the "environment" according to nesting.
First class modes can help with this:
(mode baz
(element foo (...))
(element qutz
(call-with-mode
(merge-mode (with-mode baz (current-mode)) (current-mode))
(lambda ()
(process-matching-children "baz")))))
James
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: On side effects, Paul Prescod | Thread | Element content as a string?, Norman Walsh |
| DD: Outline for "Crash course in Sc, Tony Graham | Date | Re: DD: Outline for "Crash course , lee |
| Month |