Re: Better string constants

Bruce Mitchener <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <CA+esKjNyqJiUbWbgMkZ6hk373NyCL6r=jebiM0-Wwa8NDoVFXA@mail.gmail.com>
On Fri, Mar 1, 2013 at 1:56 PM, Dustin Voss <[email protected]> wrote:

> On Feb 28, 2013, at 8:40 AM, Carl Gay <[email protected]> wrote:
>
> 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.
>

We don't necessarily give good warnings for unterminated strings now:

Serious warning at hello.dylan:7:

Invalid token beginning """ encountered.

hello.dylan:6:              -
hello.dylan:7:   format-out("Hello, world!\n);
hello.dylan:8:              -


 - Bruce

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