[Tutor] why inline-only string literals?
denis.spir at free.fr
Sun Feb 7 13:24:30 CET 2010
I recently wrote a parser for a (game scripting) language in which ordinary strings inside quotes can hold (literal) newlines:
s = "Hello,
how do you do?"
So, I wonder why most languages do not allow that from scratch; and some, like python, need a special syntax for multi-line strings. This is no parsing issue: instead, the pattern is simpler for it does need to refuse newlines!
Note: Like python, this languages takes end-of-line (outside quotes) as end-of-statement token.
la vita e estrany
More information about the Tutor