[RFC] Nestable pragmats

Jan Claeys lists@janc.be
Tue Apr 28 16:48:04 GMT 2026


On Sun, 2026-04-26 at 10:45 +0200, Jose E. Marchesi wrote:
> I have tried to collect feedback on what delimiters to use for
> pragmats in several occassions, without much success.
> 
> Some of the proposals have been:
> 
> * #[...]   (not symmetrical, used in Rust)
> * #[...]#  (symmetrical)
> * [[...]]  (syntactically weak, but used in C and C++ and
> symmetrical)
> 
> More ideas are welcome, but note that using #[...]# for pragmats
> doesn't stop us from using, say, #<...># for other purposes.  The
> worthy character # is used for comments in UPPER stropping and
> currently unused outside of string denotations in SUPPER stropping.

What about using {<symbol> … <symbol>} ?
E.g. {$ … $} or {% … %} or {@ … @}

There is a theoretical clash with comments in existing code, of course,
but it might be early enough that fixing such code (if necessary) is
not a huge effort.

I’m not sure if comments should also be {<symbol> … <symbol>} then
(e.g. {<space> … <space>} which would likely not cause errors in most
existing code, or {# … #} ?).


-- 
Jan Claeys

(please don't CC me when replying to the list)


More information about the Algol68 mailing list