From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: "Ludovic Courtès" <INVALID.NOREPLY@gnu.org>
Cc: jim@benderweb.net, "Ludovic Courtès" <ludo@gnu.org>, bug-guile@gnu.org
Subject: Re: [bug #31691] Ellipsis not supported in nested `sxml-match' forms [1.9.13]
Date: Wed, 7 Sep 2011 13:13:27 +0200 [thread overview]
Message-ID: <CAGua6m1TQ3N_PQ44tLr2YXD+cf6E_wLpE8p=EPZcuwGDFYy4mw@mail.gmail.com> (raw)
In-Reply-To: <20110906-212726.sv15145.16521@savannah.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2329 bytes --]
The code is hackish but it shows the reason behind the error in the report.
The semantic behind the idea should not be hackish. any expression (x ...)
with no ellipsis var in x has earlier been an error so there is no danger in
corrupting
code out there. On the other hand there is still room to improve it further.
On the other hand, we will miss an oppertunity to find code errors by
missplaced a .... so that is what we will loose by doing this.
I noticed that syntax-rules and case-lambda does either not allow for
recursive uses of ... but signals an error if the same kind of code is
tried. I would like
tghe solution here to be the same for both of these kinds of matchers.
the ___ solution seams also hackish and I do not follow exactly how it is
used.
can you submit an example to show how it works.
What I can think of is that we could use a quotation system e.g. be able to
quote ...
this means that we need to introduce '... ''... etc at the right places in
order to exactly
show the intention of how to expand e.g.
(sxml-mathc x ((a ,x ...)
(list (sxml-match x ((b ,y '...)
(list (sxml-match y ((c ,z ''...) z)
'...))
...)
To me this is most satisfying because it will keep on finding missplaced ...
and it will
be more exact in the intention of the code it will not be hard to implement.
The downside is that a very small possibly zero number of matchers will stop
working due to the possibility of using quote as a ellipsis variable.
I can very well imagine that quoting is seen as difficult and in order to
promote correct code we should leave the code as is forcing people to cut up
the logic as done in the working example in the original report.
/Stefan
On Tue, Sep 6, 2011 at 11:27 PM, Ludovic Courtès <INVALID.NOREPLY@gnu.org>wrote:
> Follow-up Comment #6, bug #31691 (project guile):
>
> Hmm, that seems a bit hackish. :-)
>
> (ice-9 match) has `___' as an alternate syntax for `...' in situations
> where
> the latter cannot be used. Maybe we should just do that?
>
> _______________________________________________________
>
> Reply to this item at:
>
> <http://savannah.gnu.org/bugs/?31691>
>
> _______________________________________________
> Message sent via/by Savannah
> http://savannah.gnu.org/
>
>
[-- Attachment #2: Type: text/html, Size: 2872 bytes --]
next prev parent reply other threads:[~2011-09-07 11:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-18 9:10 [bug #31691] Ellipsis not supported in nested `sxml-match' forms [1.9.13] anonymous
2010-11-19 16:28 ` Andy Wingo
2010-11-19 16:41 ` Andy Wingo
2011-07-15 11:36 ` Stefan Israelsson Tampe
2011-09-02 17:17 ` Andy Wingo
2011-09-05 13:40 ` Stefan Israelsson Tampe
2011-09-06 21:27 ` Ludovic Courtès
2011-09-07 11:13 ` Stefan Israelsson Tampe [this message]
2011-09-11 21:54 ` Stefan Israelsson Tampe
-- strict thread matches above, loose matches on Subject: below --
2010-11-19 22:56 Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGua6m1TQ3N_PQ44tLr2YXD+cf6E_wLpE8p=EPZcuwGDFYy4mw@mail.gmail.com' \
--to=stefan.itampe@gmail.com \
--cc=INVALID.NOREPLY@gnu.org \
--cc=bug-guile@gnu.org \
--cc=jim@benderweb.net \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).