Re:Show HN: Mark 1.0, a notation that unifies JSON, HTML, JS...
by FerkiHN on Friday July 18, 2025 @11:50AM
(#44606119)
Sorry for writing in a strange way, in short, your Mark is wonderful, but I don't like the symbols in the markup like "<" before each command, because without them, in fact, you can also make a working markup, maybe they use it for beauty?
[ Parent
| on HN ]
Re:Show HN: Mark 1.0, a notation that unifies JSON, HTML, JS...
by henryluo on Thursday July 24, 2025 @10:09AM
(#44670893)
As for the '<' and '>' to open and close an element, there are two potential kinds of syntax design.
Option 1 is to use some explicit delimiters. Mark 1.0 has settled on '<' and '>'. Mark 0.11 was using '{' and '}', which I felt confusing with map. So I changed to '<' and '>', to make it consistent with HTML/JSX and XML, which most developers are already used to.
Option 2 is to use indentation to delimit the enclosed child content, like in Python and YAML.
Option 2 looks cleaner for configuration kind of usage. However, Mark is designed to be embedded in a scripting language, and used beyond just configuration files. Unless the scripting language uses indentation as delimiter, like Python, option 2 will not work.
Personally, I prefer C/Java/JS family of languages that has insignificant whitespace. So Mark is designed to use explicit delimiters '<' and '>' to enclose an element.
Hope that explains one of the most important syntax designs of Mark.