Curl As Lightweight Markup
Because Curl provides both for user-defined text procedures and stylesheets, Curl can be used readily as domain-specific lightweight markup. A major advantage over plain text HTML markup is that the text encoding can be set as, e.g., utf-8, and text entered in a Unicode-enabled editor without any escaping of characters (like JavaScript, Curl is Unicode friendly.) A poetry example would be:
{poem || wraps entire poem {stanza || first verse here in any language } {stanza || another verse here in any language } }which can initially be implemented by defining the poem and stanza markup as paragraph text formats. Stanza could be further refined to include a hidden navigation anchor for page navigation using the Curl {destination} which is itself a text procedure.
The same markup can be used for different results, as one can style text to be visible in one context and invisible in another. Curl also permits top-level file inclusion so that a source text in markup can be included in different parent files. In education, for example, one could create a source file of test questions, and include it in both a student and a teacher version of the text.
Read more about this topic: Curl (programming Language)
Famous quotes containing the word curl:
“An object among dreams, you sit here with your shoes off
And curl your legs up under you;”
—Randall Jarrell (19141965)