Re: Eliminate numeric-range over inexact numbers?
Wolfgang Corcoran-Mathe 28 Aug 2020 16:59 UTC
On 2020-08-28 18:27 +0200, Marc Nieper-Wißkirchen wrote:
> > This seems like a very good idea. If I understand correctly, though,
> > from an implementation perspective, we would still need to store a lower
> > bound. For example,
>
> Could you give me an example of where the lower bound is actually needed?
> It is just one opaque part of the indexer. (For non-numeric ranges, it
> doesn't even make sense to talk about a lower bound.)
Sorry, you're right. The lower bound isn't necessary. The `range'
constructor should only take a length and an indexer.
> Note that in my proposal, the start-index is not exposed to the indexer.
> The various SRFI 196 procedures add the start index to n before passing it
> to the indexer.
Yes. Indexers now take a single argument.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"Therefore, 100 victories in 100 battles is not the most skillful.
Subduing the other's military without battle is the most skillful."
--_Sun Tzu_