Re: Please update SRFI-105 David A. Wheeler (29 Oct 2012 21:33 UTC)
Re: Please update SRFI-105 Alan Manuel Gloria (30 Oct 2012 01:58 UTC)
Re: Please update SRFI-105 David A. Wheeler (30 Oct 2012 16:30 UTC)
Re: Please update SRFI-105 Jens Axel Søgaard (30 Oct 2012 18:54 UTC)
infix.plt David A. Wheeler (31 Oct 2012 03:17 UTC)
Re: Please update SRFI-105 Mark H Weaver (30 Oct 2012 06:52 UTC)
Re: Please update SRFI-105 David A. Wheeler (30 Oct 2012 16:25 UTC)
Re: Please update SRFI-105 Mark H Weaver (30 Oct 2012 07:10 UTC)

Re: Please update SRFI-105 David A. Wheeler 30 Oct 2012 16:30 UTC

Alan Manuel Gloria:
> Looks like you overlooked this e-mail:

You're right, sorry about that.  Thanks for pointing that out.

> Here's another bit that seems a bit confusing...
>
> The approach does allow references to variable names with “-”
> embedded in them without effort,
> but the names must be spelled differently (and thus inconsistently)
> by replacing every “-” with “_”.
> Thus, variables like “list-ref” must
> be spelled as “list_ref” inside the infix.plt notation
> without effort.
>
> In particular the last "without effort" there seems to be something
> that got left behind in some edit.
>
> I also think that the bit "The approach does allow references to
> variable names with '-' embedded in them without effort," should be
> "little effort" instead, as it's not actually *without* effort, users
> having to translate - to _ after all.
>
> --
>
> At the very least, it seems the bit "must be spelled as 'list_ref'
> inside the infix.plt notation without effort." doesn't seem to scan
> well.  I'm not sure what you mean here by the "without effort" clause;
> I suspect it's a mistake, but maybe you meant something else?

Hmm.  Okay, let's start with a discussion about what's *documented*, and then clarify the ramifications of the undocumented and useful |...| notation.  That may make things clearer.  Here's my attempt:

=================================================
Many variables and operators are more difficult to refer to
and/or must be spelled differently (and thus inconsistently).
Its documentation states that
identifiers (which are also used for function names) must
“begin with a letter, and is optionally followed by series of letters,
digits or underscores.  An underscore is converted to a -”.
Under these rules, it is not possible to call procedures with names like
&#8220;<samp>char=?</samp>&#8221; or use variables
with &#8220;*&#8221; embedded in them.
It does allow references to variable names with &#8220;-&#8221;
embedded in them, but in this approach
names must be spelled differently (and thus inconsistently)
by replacing every &#8220;-&#8221; with &#8220;_&#8221;.
Thus, variables like &#8220;list-ref&#8221; must
be spelled as &#8220;list_ref&#8221; inside the infix.plt notation
as documented.
The infix.plt documentation did not, at the time of this writing,
document any way around this limitation.
However, on 2012-10-21,
Jens Axel S&#248;gaard reported that other identifiers <em>can</em>
be referred to using the |...| syntax.
This works around the problem, but is slightly more cumbersome when
it is necessary, and is inconsistent with other code where |...|
is not required.
These are fundamental side-effects of not <em>requiring</em> infix operators
to be delimited (e.g., by whitespace).
Since some symbols must be escaped with |...| inside infix.plt, yet they
do not need to be escaped otherwise, this is an inconsistency, and this
inconsistency can lead to potentially hard-to-find errors.
======================================================

--- David A. Wheeler