Hacker News new | ask | show | jobs
by iamthad 2271 days ago
It's not clear to me what you mean by "longstrings" from that page. Are you referring to the double-bracket quoted style?
1 comments

Yes. A Lua-style longstring is delimited by [===[ and ]===] where the number of = signs can be arbitrary (including zero); the end must have the same number of = signs as the beginning. Any string can be encoded inside of a longstring without escaping, simply by using long enough delimiters. There are a number of advantages to this notation: it's more readable (usually), it generally results in shorter code files, and longquoted substrings can be directly addressed without translation (though there may be other reasons not to pass that pointer around).