Re: Reader syntax and general reasoning
Marc Nieper-WiÃkirchen 26 Jan 2025 18:52 UTC
Am So., 26. Jan. 2025 um 19:35 Uhr schrieb Wolfgang Corcoran-Mathe
<xxxxxx@sigwinch.xyz>:
>
> Hi Antero,
>
> On 2025-01-25 17:41 -0500, Antero Mejr wrote:
> > Is there an intended use case that necessitates the inclusion for the
> > :|| syntax? The SRFI says that most implementations do not offer a
> > syntax. I think ":||" will be a bit annoying to implement in a reader:
> > it isn't prefixed by "#", and ":" is a valid character in identifiers.
>
> Uninterned symbols must have a datum notation if they're to be usable
> with datum->syntax. That's necessary, I believe, to implement the kind
> of macros Daphne discusses in her message (at least, in the way she
> implements them).
As I have mentioned earlier, the notation :|foo| is incompatible with
R7RS Small.
The argument that symbols need a datum notation so that they are
usable with datum->syntax is a bogus one. It is true that Scheme datum
values are defined as the set of objects that have an external
representation modulo "equal?" equality, and that the original
definition of "datum->syntax" in R6RS only accepts datum values for
its second argument. However, the obvious solution (that does not
introduce useless (*) lexical syntax) is to extend the domain of
"datum->syntax".
(*) We haven't yet seen any code that makes use of the lexical syntax
(in a way that cannot be easily solved differently).
[...]
> > I would also like to echo John/Shiro/Marc's concerns, and add another
> > comment: why would uninterned symbols need to be specified across
> > implementations as a standardized SRFI?
>
> As I think the Prior Art section of the SRFI shows, while many Schemes
> provide uninterned symbols, it's extremely difficult to write portable
> code using them. The rationale for SRFI 258 is thus the same as it is
> for any SRFI describing a non-portable feature: if the feature is worth
> having and current implementations are inconsistent, then it's worth
> standardizing.
I think it is being challenged that it is worth to have the feature.
Is anyone writing a SRFI for "define-macro"?