Re: Better string constants
Carl Gay <[email protected]>
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <CALekcH2f9AyEgFjRw3U88QHuzerNDR1A37rmQDNsFkhCCCpY_g@mail.gmail.com> |
On Thu, Feb 28, 2013 at 9:52 AM, Alfredo Beaumont < [email protected]> wrote: > I don't see any reason not to allow multiline strings with the actual > syntax: > > " > A: { > a: 'a' > b: 'b' > c: 'c' > } > " > Will the compiler always be able to give good warnings for unterminated strings? I don't see how. If not, I'd prefer to have the common case stay as it is and add new syntax for the less common cases of multi-line and raw strings. > > An alternative syntax could be provided to avoid abusing escaping: > > """ > A: { > a: "a" > b: "b" > c: "c" > } > """ > > If coil works as shown by bruce i don't even think the alternative > syntax is too important. > I also don't think a raw syntax is worth a new syntax. > I'm confused. It looks like you're suggesting that """ would be used for raw strings. On a separate issue, I wonder if it's necessary to specify the EOL sequence in multi-line strings. (Python doesn't seem to specify, but sort of assumes just \n.) That is, on Windows, will """A B""" be the same as "A\nB" or "A\r\nB" ? _______________________________________________ hackers mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/hackers