[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Interpret #r"..." as a raw string
From: |
Daniel Brooks |
Subject: |
Re: [PATCH] Interpret #r"..." as a raw string |
Date: |
Sat, 27 Feb 2021 12:41:29 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Richard Stallman <rms@gnu.org> writes:
> > Many languages have multiple string types because they simplify the
> > process of writing strings that contain quotation characters,
> > backslashes, or other syntax such as interpolation.
>
> I'm trying to understand that message but it's unclear
> at a deep level.
>
> Is a "raw string" supposed to be a different data type,
> or is it supposed to be a different syntax for the string type?
>
> The companison with shell syntax does not help, because I don't think
> that question is meaningful for shell syntax. I don't know the othehr
> languages referred to.
It is definitely just a different syntax for the same data type
(although some languages additionally have syntax that distinguishes
between utf8 string strings and byte strings with no particular
encoding; those generally end up as a different data type).
I used shell as an example primarily because it will be familiar to
everyone. It is however unusual that shell has a string syntax which
disables interpolation but not escaping; most languages with raw strings
use them to turn off both features.
db48x
Re: [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/02/26
Re: [PATCH] Interpret #r"..." as a raw string, Eli Zaretskii, 2021/02/26
Re: [PATCH] Interpret #r"..." as a raw string, Zhu Zihao, 2021/02/28