gracelang / minigrace

Self-hosting compiler for the Grace programming language
39 stars 22 forks source link

Behaviour of multi-line strings is not described in the Specification #187

Closed petercowal closed 8 years ago

petercowal commented 8 years ago

For instance:

def x = 5
print ‹{x}\n›

will print {x}\n

I wasn't able to find ‹strings› within the spec, so I'm not sure if this behavior is deliberate or not; I guess that adding strings enclosed in ‹› to the spec is an issue of its own?

apblack commented 8 years ago

The use case for multi-line-strings is exactly that they don't support interpolation or string escapes. Instead, everything between the quotes gies in the string. The use case is copying a long document (documentation, help message, program text to be used as input, etc) into a program, without having to escape embedded quotes, braces, newlines, etc.

And yes, this should be added to the spec.

apblack commented 8 years ago

I added a section to the spec.