[m-users.] Proposal: Haskell-style string literals

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Nov 3 21:13:29 AEDT 2025



On Mon, 03 Nov 2025 11:08:38 +0100, Volker Wysk <post at volker-wysk.de> wrote:

> Hi!
> 
> Haskell has a neat syntax for strings that span mulitple lines. It looks
> like this:
> 
> foo = "This is a long string \
>       \literal that doesn't \
>       \fit on one line."

What does this get you that you don't get with

foo = "This is a long string" ++
    "literal that doesn't" ++
    "fit on one line."

?

The string concatenations are done at compile time either way.


Zoltan.


More information about the users mailing list