[Rd] [WISH / PATCH] possibility to split string literals across multiple lines
Gábor Csárdi
csardi.gabor at gmail.com
Fri Jun 16 20:14:25 CEST 2017
On Fri, Jun 16, 2017 at 7:04 PM, Radford Neal <radford at cs.toronto.edu> wrote:
>> On Wed, 14 Jun 2017, G?bor Cs?rdi wrote:
>>
>> > I like the idea of string literals, but the C/C++ way clearly does not
>> > work. The Python/Julia way might, i.e.:
>> >
>> > """this is a
>> > multi-line
>> > lineral"""
>>
>> luke-tierney at uiowa.edu:
>
>> This does look like a promising option; some more careful checking
>> would be needed to make sure there aren't cases where currently
>> working code would be broken.
>
> I don't see how this proposal solves any problem of interest.
>
> String literals can already be as long as you like. The problem is
> that they will get wrapped around in an editor (or not all be
> visible), destroying the nice formatting of your program.
>From the Python docs:
String literals can span multiple lines. One way is using
triple-quotes: """...""" or '''...'''. End of lines are automatically
included in the string, but it’s possible to prevent this by adding a
\ at the end of the line.
[...]
Gabor
More information about the R-devel
mailing list