Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(28 Aug 2020 11:49 UTC)
|
Re: Extensibility (and the lack thereof)
Felix Thibault
(28 Aug 2020 18:06 UTC)
|
Re: Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(28 Aug 2020 19:22 UTC)
|
Re: Extensibility (and the lack thereof)
John Cowan
(29 Aug 2020 00:46 UTC)
|
Re: Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(29 Aug 2020 08:14 UTC)
|
Re: Extensibility (and the lack thereof)
Wolfgang Corcoran-Mathe
(26 Oct 2020 17:50 UTC)
|
Re: Extensibility (and the lack thereof)
John Cowan
(26 Oct 2020 20:04 UTC)
|
Re: Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(26 Oct 2020 20:33 UTC)
|
Re: Extensibility (and the lack thereof)
Felix Thibault
(26 Oct 2020 21:17 UTC)
|
Re: Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(26 Oct 2020 21:30 UTC)
|
Re: Extensibility (and the lack thereof)
Felix Thibault
(26 Oct 2020 22:42 UTC)
|
Re: Extensibility (and the lack thereof)
Felix Thibault
(26 Oct 2020 22:49 UTC)
|
Re: Extensibility (and the lack thereof)
John Cowan
(27 Oct 2020 00:05 UTC)
|
Re: Extensibility (and the lack thereof)
Felix Thibault
(27 Oct 2020 00:35 UTC)
|
Re: Extensibility (and the lack thereof)
John Cowan
(27 Oct 2020 01:59 UTC)
|
Re: Extensibility (and the lack thereof)
Felix Thibault
(27 Oct 2020 02:18 UTC)
|
Re: Extensibility (and the lack thereof) Wolfgang Corcoran-Mathe (27 Oct 2020 19:38 UTC)
|
Re: Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(27 Oct 2020 19:46 UTC)
|
Re: Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(28 Oct 2020 06:31 UTC)
|
Re: Extensibility (and the lack thereof)
Felix Thibault
(28 Oct 2020 21:30 UTC)
|
Re: Extensibility (and the lack thereof)
John Cowan
(29 Oct 2020 00:17 UTC)
|
Re: Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(29 Oct 2020 16:42 UTC)
|
Re: Extensibility (and the lack thereof)
Marc Nieper-Wißkirchen
(27 Oct 2020 17:20 UTC)
|
Re: Extensibility (and the lack thereof)
Felix Thibault
(27 Oct 2020 18:42 UTC)
|
On 2020-10-26 21:58 -0400, John Cowan wrote: > On Mon, Oct 26, 2020 at 8:35 PM Felix Thibault <xxxxxx@gmail.com> > wrote:n > > Wait, is this like (match (view-proc obj) pattern ...)) ? > > > > That was my original idea, but now I think it's better to do it > differently. I'm going to stick with -> for now, as I think it helps > readability. Here's an example: > > (define-record-type <point> > (make-point x y) > point? > (x point-x) > (y point-y)) > > (define (point-view pt) > (if (point? pt) > (values (point-x pt) (point-y pt)) > (values)) > > (define p (make-point 10 20)) > > (match p > ((-> point? point-view 10 y) > (+ y 1))) => 21 This looks very nice! Maybe this relates to Marc's point about tree patterns, but it seems that we'd want to recursively bring the whole power of the matcher to bear on the patterns appearing after <view-proc>, so that complex structures can be matched without nested matches. e.g., the pattern grammar would be extended in something like the following manner: pat : ⋮ | (-> predicate proc pat1 ... patN) Apologies for the redundancy if this is what everyone was already thinking. -- Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz> "Scientific theories are judged by the coherence they lend to our natural experience and the simplicity with which they do so. The grand principle of the heavens balances on the razor's edge of truth." --Commissioner Pravin Lal (Sid Meier's Alpha Centauri)