From: Per Bothner <per@bothner.com>
To: Damien MATTEI <Damien.Mattei@unice.fr>, kawa@sourceware.org
Subject: Re: behavior of CASE with strings PART 2
Date: Thu, 19 Jan 2017 16:00:00 -0000 [thread overview]
Message-ID: <1a7c607c-4bcf-9ba8-a421-d4dbebba0047@bothner.com> (raw)
In-Reply-To: <201701191104.06039.Damien.Mattei@unice.fr>
On 01/19/2017 02:04 AM, Damien MATTEI wrote:
> i understand the various implementation of Scheme follow or not the R5RS and R7RS
> but this could be changed in a future revision because it is limitating to be able to use CASE with STRINGS
> in language such as ASP, Java and not Scheme, with Racket it seems that equal? predicate is used,
> so probably my code will work with Racket.
I guess it may be worth considering extending case to use equal? rather than eqv?.
Though in theory an incompatible change, I don't see how it would break working programs.
What do people think? Though note this is not just a one-line change. I'd have to study to case
implementation and optimizations and see what would need to change. So it could be a
"wishlist" item, but not necessarily right away.
> i think of many solutions and finalyy begin to write a recursive macro implementing a case-string
> but i'm facing proble with multiple "ellipsis" in a recursive macro and wanted to debug it this morning
> when i read your last message, so here it is:
There is a syntax-rules implementation of case in R7RS (7.3 Derived expression types).
You could use thtat as a starting-point. Of course it wouldn't have the optimizations
of Kawa's builtin case.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
next prev parent reply other threads:[~2017-01-19 16:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 10:07 Damien MATTEI
2017-01-17 13:24 ` Per Bothner
2017-01-17 15:57 ` Jamison Hope
2017-01-18 6:37 ` Per Bothner
2017-01-19 4:53 ` Per Bothner
2017-01-19 10:04 ` Damien MATTEI
2017-01-19 16:00 ` Per Bothner [this message]
2017-01-21 9:47 ` Damien Mattei
2017-01-22 4:36 ` match form as a generalization of case Per Bothner
2017-01-23 22:12 ` Damien Mattei
2017-01-23 22:27 ` Per Bothner
2017-01-20 22:54 behavior of CASE with strings PART 2 Damien Mattei
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a7c607c-4bcf-9ba8-a421-d4dbebba0047@bothner.com \
--to=per@bothner.com \
--cc=Damien.Mattei@unice.fr \
--cc=kawa@sourceware.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).