Re: Are pragmas always "instructions"? (was: Re: What is a pragma?)

>> # What are pragmas?
>
>> Broadly speaking, pragmas are instructions embedded in source code,
>> which extend the structures available in the language of the source
>> code.
>
> Describing pragmas as instructions seems to suggest that they will by
> nature have an imperative meaning.
>
> Is that suggestion intended?

No, not at all. I think “instructions” here is a gloss for “additional
information that may be interpreted by software operating on the source
code.” Or something like that.

At the end of your message, I think you propose:

   Pragmas convey information (and in particular information not
   conveyed by the standard semantics of ixml, or not conveyed in the
   same way)

Which I have no trouble with, though I’m not sure we’ll get immediate
agreement on what “convey information” means.

One aspect of the description that I think is essential is that it is
explicitly intended that machines be able to interpret pragmas. That
suggests, to me, that they aren’t “just comments” and that they need to
have a minimal amount of defined structure.

What minimal structure? I’m not sure. Off the top of my head: a name
(insert argument about whether it needs to be possible to create
globally unique names in a decentralized fashion here), followed by
data. Where data can contain any characters, including pragma start and
end marks and comment start and end marks as long as they’re balanced.

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Saturday, 29 January 2022 10:40:53 UTC