Re: pragmas proposal - please read and comment

Steven Pemberton <steven.pemberton@cwi.nl> writes:
> My very strongly held position is that pragmas should be a form of
> comment, thus using the { } notation, and not use the character set
> notation [  ].

As I said in the meeting today, I’d simply never noticed the overlap
with character set notation. They’re sufficiently different that I don’t
actually think it’s a problem. But as I also said, if we get to the
point where our only disagreement is on the delimiters, we can declare
victory and go paint a bike shed somewhere.

I’d really rather not make pragmas a form of comment. I think that blurs
an important semantic distinction. And I don’t think it adds any value.
If we say that “{!” is reserved for pragmas, for example, and that
“comments” are forbidden from having “!” as their first character, I
think that just makes the waters murkier. If we say that “{!” is either
a pragma or a comment depending on what follows and whether or not you
recognize it, that’s even worse.

> That would already help fulfil the pragma-oblivious requirement.

If we were trying to shoe-horn pragmas into v2 of the language, we’d
basically *have* to do that. But we aren’t. We can do anything we want
and the very first conformant processors will, by definition, be
pragma-oblivious whatever we decide because being pragma-oblivious can
be a conformance requirement!

I think paired delimiters are a good idea. I like the pragma proposal’s
example with nested pragmas. If we don’t allow them to nest, we’re just
going to encourage ad hoc conventions for faking it, so let’s try to
make them nestable.

What are our options? If we want single characters:

[…] - already used for character ranges
{…} - already used for comments
(…) - already used for grouping
<…> - you know … nah, forget I mentioned it.

We don’t have to go with single characters, though. If [pragma] looks
too much like a form of character set, does [[pragma]] help? Or is
<<pragma>> sufficiently not like XML that it’s plausible?

Of course, if we branch out to Unicode more broadly, there are a lot
more single character options: ⟦…⟧, ⧼…⧽, ﴾…﴿, «…», ⟘…⟙, ⊂…⊃, ¿…?, ¡…!,
etc., etc.

You could sell me on any one of those with some sort of multi-character
ASCII alternative for the keyboard impaired.

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Tuesday, 11 January 2022 19:04:40 UTC