Custom state variables Marc Nieper-Wißkirchen (10 Feb 2019 15:32 UTC)
Re: Custom state variables Alex Shinn (10 Feb 2019 15:48 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (10 Feb 2019 16:38 UTC)
Re: Custom state variables Alex Shinn (11 Feb 2019 07:18 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (11 Feb 2019 08:10 UTC)
Re: Custom state variables Alex Shinn (11 Feb 2019 09:42 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (11 Feb 2019 12:48 UTC)
Re: Custom state variables Jim Rees (13 Feb 2019 05:16 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (13 Feb 2019 07:01 UTC)
Re: Custom state variables Jim Rees (13 Feb 2019 15:29 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (13 Feb 2019 16:06 UTC)
Re: Custom state variables Jim Rees (13 Feb 2019 17:07 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (13 Feb 2019 18:07 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (15 Feb 2019 07:12 UTC)
Re: Custom state variables John Cowan (15 Feb 2019 15:00 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (15 Feb 2019 07:26 UTC)
Re: Custom state variables Marc Nieper-Wißkirchen (11 Feb 2019 09:46 UTC)

Re: Custom state variables Marc Nieper-Wißkirchen 15 Feb 2019 07:26 UTC

Am Mo., 11. Feb. 2019 um 10:43 Uhr schrieb Alex Shinn <xxxxxx@gmail.com>:

[...]

> On Mon, Feb 11, 2019 at 4:10 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
>>
>> Am Mo., 11. Feb. 2019 um 08:18 Uhr schrieb Alex Shinn <xxxxxx@gmail.com>:
>> >
>> >
>> > It's worse than that though, since the identifiers conflict with themselves - you're likely to want nested formatters referring to the `col` variable (the ref impl does this), for instance, and this would no longer be possible without renaming.
>>
>> Maybe I don't understand the problem, but isn't the simple solution to
>> write, say, `(fn ((%col col)) ...)' instead of `(fn ((col col)) ...)'
>> or `(fn (col) ...)' in these cases?
>
>
> Yep, that's what I meant by "renaming."  I'm not sure how often this will bite people.

SRFI 99 uses datum->syntax (though not part of R7RS-small) to make up
constructor and predicate names for record types (by adding a prefix
like "make-" or a suffix like "?") when they are not explicitly given.

Using the same technique, "(fn (col) ...)" could expand into "(fn
((col state-var-col)) ...)", where "state-var-" is some documented
prefix. SRFI 159 (and derived libraries providing further formatters)
would then have to export state variables under two names, one without
and one with the prefix.

I'm not saying that I like this solution (it's very unhygienic in a
different way) but it would remove the necessity of renaming "col" by
"%col" by hand.

[...]

Marc