Skip to content

Design better raw string syntax #5091

Closed

Description

@sophiajt

Related problem

As of #5090 we're using backticks for raw strings.

These are fine, but have some issues:

  • they're a bashism, but don't work like the bash version
  • they're difficult to type on some keyboards

Describe the solution you'd like

Something a bit more Rust-like maybe? Something that isn't a bashism and is clearly a special kind of string.

Describe alternatives you've considered

We can keep backtick and just take the disadvantages.

Additional context and details

No response

Activity

  1. added
    status:needs-design
    polish
    on Apr 5, 2022
  2. webbedspace commented on Nov 9, 2022

    @webbedspace
    Contributor

    Backtick strings aren't necessarily a "Bashism" - they've been added to Javascript in 2016 (but serve as multi-line + interpolation strings rather than raw strings). I'd dare suggest more people are aware of the JS backtick strings than the Bash ones by now.

  3. e-codes-stuff commented on Mar 15, 2023

    @e-codes-stuff

    Any updates on this? I feel that backtick strings are a bit confusing right now specifically because of how they are interpreted as a command to execute in the context of things like let bindings. I would prefer these cases being separate, and having some explicit "raw string" concept like Rusts r"<string contents>" syntax which always produces a string value.

  4. added a commit that references this issue on May 2, 2024
  5. added this to the v0.94.0 milestone on May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    polishstatus:needs-design

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions