From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Interpret #r"..." as a raw string Date: Tue, 2 Mar 2021 14:01:10 +0200 Message-ID: References: <20210227.031857.1351840144740816188.conao3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10901"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: emacs-devel@gnu.org To: Matt Armstrong , Alan Mackenzie , Naoya Yamashita Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 02 13:02:50 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lH3jl-0002jP-Kn for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 13:02:49 +0100 Original-Received: from localhost ([::1]:33328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH3jk-0000cn-K0 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 07:02:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH3iJ-0008Nd-R2 for emacs-devel@gnu.org; Tue, 02 Mar 2021 07:01:19 -0500 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:43747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lH3iH-0005r1-V0 for emacs-devel@gnu.org; Tue, 02 Mar 2021 07:01:19 -0500 Original-Received: by mail-wr1-x42f.google.com with SMTP id w11so19558417wrr.10 for ; Tue, 02 Mar 2021 04:01:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WwwyM0knLcmXXZKrdxTcfivpxyvqi1z1PbSdMtzd77Q=; b=OBfgbYnBXV/mTmTni8rONS0JTPUTpS/KGUbDGO1IqWIKlISR/NYhJ5+1sN143S+KNk iHXAToEwske1g6xHOrxbo7PEmBgdSj+Ar08EHmXvjzOTa4JVC9XmqwfNVb7yBg0G1xVC l3rf3hmCEAM1wrTLMdpVggU+thYyFLeiNn7BTqXBKJ1tU1LywKr24gld9ywBC/LYa9Zv 4rw36eYupAQpQbN3izJwMPNa0mmPHoQeXCVcyuQPymmMm/PTpKmJs0G7o6BmIyCagIzj dbFIPvLDf0wW30vXr3PTJKCBIJIIIbsAMiSQhOb0m8nreGd8DnTxFJYX/kF88a+Q5K1q 69dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WwwyM0knLcmXXZKrdxTcfivpxyvqi1z1PbSdMtzd77Q=; b=MFCNwDQzhym/ZoqFE+3PDlf2AwytnKED0u5kjO5AONjNYJ14NMIehDZqFNhvdbCAI6 q1UaYB/QN3EZlH93UF1SQ19VB+hPvtT3v23plCbiugo0AMOVba7HGDE3XctoQxPVZ6fK fuwUsJVvcXlMmHzB9GUTpOD1mn2ZMVtF9og/mUipmIEqj4ns3nr9WRcP1hABRIHuJBRo ITyIxtOhJoUtkizO8P9c7x6f+oSW9tC0jss89q+yR8QdsQqTCUXnMLssqWT1VCgqKUOc /bbbrh9nhow0Mpq/twaWaB1GaUPgz2sCXTMVyJdd8TzwkOSyGBdQqao0XsgF9yfp7ga/ /FVg== X-Gm-Message-State: AOAM5300pMvbcsqdGgdVeS+4BorGGSdbwlsIbWamja/ah0BggF/vIWPL ypftcsmnv1EhDgcgT1A4TmguPFBgAVA= X-Google-Smtp-Source: ABdhPJwbso46Bjh65kO7i6wFRauNkmb1ATDzuLfAtrLXvFHlCfQwH+9rfGGx/YauWikzwrik4Ej1tQ== X-Received: by 2002:adf:e548:: with SMTP id z8mr22222225wrm.246.1614686474509; Tue, 02 Mar 2021 04:01:14 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id w9sm2309844wmk.16.2021.03.02.04.01.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 04:01:13 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265823 Archived-At: On 02.03.2021 07:59, Matt Armstrong wrote: > C++ has probably the most flexible "gold standard" raw string literals. > As Alan I think rightly points out, this makes the language and all > tools that process the language more complex. This is a high cost, so > the feature should deliver some real value. > > For those that don't know, C++'s raw string literals can be as imple as > this for the string "raw-content": > > R"(raw-content)" > > But if the content itself contains the character sequence )" then the > programmer can specify any delimiter they want: > > R"DELIMITER(raw-content)"more-raw-content)DELIMITER" Sounds very similar to Ruby's heredocs or "Percent Strings" (and both of those have their own extra complexity because of allowed nesting). Both are supported by ruby-mode with syntax-propertize-function without too much trouble.