Re: Better string constants

Dustin Voss <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <[email protected]>
On Feb 28, 2013, at 8:40 AM, Carl Gay <[email protected]> wrote:

> 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.
>  

What do you mean by “good warnings”? The compiler should certainly be able to see that it hits the end of the source record with an unterminated string.

As far as the BNF goes, the only change necessary to support this would be to change the definition of string-character to include newline in addition to space.

_______________________________________________
hackers mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.