More on identifiers

Since I've been blogging on identifiers something came to my mind. There are absolute identifiers (for Chapters and Sections) and relative ones (for paragraphs). The syntax should reflect this. What about :

The reverse solidus (well-known of Windows users) is convenient for expressing path-like structures, while not conflicting with the solidus used in URLs. A relative identifier requires an absolute identifier. For a Part like this:
== Section


Blah blah. 

Blah blah blah. 

Here is a valid reference to the paragraph:
The absolute identifier may be carried by the context. As described in the Book post, only some Paragraphs in a Section may be included so referencing the Section is a way to define such a context.
expand \\section-identifier
Ok the syntax has slightly evolved since but you get the idea. The reverse-solidus based notation looks good to me. Double path separator for an absolute path is a well-known pattern (URL spec). I like the idea to ask a bit more work for an absolute identifier as they should be used carefully, in order to avoid global namespace pollution. With that syntax we now support an uniform relationship model between Chapters, Sections and Paragraphs.

No comments: