multiline string/string literal without escape processing

Paul Benedict pbenedict at apache.org
Sun Aug 21 18:18:27 PDT 2011


Long live <![CDATA[ sections :-)

On Sun, Aug 21, 2011 at 12:03 PM, Per Bothner <per at bothner.com> wrote:
> IMO more valuable that multiline string/string literal without escape
> processing
> would multiline string/string literals with embedded expressions.  For
> example,
> to pick some arbitrary syntax:
>
>   #"The percentage is \{a * 100.0 / b}%."#
>
> This lends itself to template processing, easier-to-use
> internationalization,
> less error-prone println calls, and more.
>
> A pure literal multi-line string without embedded expressions seems to be
> much less useful.  Yes, it would be nice to avoid backslash-explosion,
> but that's mostly a factor in regexps and Windows filenames, which are
> unlikely to need to be multi-line.
> --
>        --Per Bothner
> per at bothner.com   http://per.bothner.com/
>
>



More information about the coin-dev mailing list