From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25674 invoked from network); 12 Feb 2021 06:17:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Feb 2021 06:17:40 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613110660; b=NlQz1T+NF3T4eAcR7bvpiwA2cKL+0rbbnH0/izx0ruUbWNq90COuPyL1/4YUhWbc9Xb0MZBECc hWtetJUjrVleIsfAUHFdfsCYW1Q7H0Pcxb7OWZ36VZbxB7uSs4n1ReM+Hm5auvV6RGDnwZ6vEH XaLX3KQRynuvFIjfa6q0AoD7mWt73msYeZ8Ls3Hg2b8LoLLWInLpeoLw0xebpbRlou8PFpsoDZ 2EdP7fYYcpUhzVwi35RWSpsPIGJ4iAuzlglORUR3cZitSAMXu0DiPPUUS0FRfj+NO38OMPAXGV KbwkMF4GuaA32IlShfySWEKfmttg28ky9T8R6HZM4XLNsQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f175.google.com) smtp.remote-ip=209.85.167.175; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613110660; bh=xXrem/uH/SD004Ho0573VthR7zYr7mke6UUfUMpXY/0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=YCJdLI9eDZEQAGIjtjoRA5qc5LkuBk2O/CHX/e/+UDSZmZTVPU+HdR3A+U7Ov8WVNkXHzZG4ay 3dyd2we/j0h0EiKRzhwOhihRpeoCfNWuLMQ8SQeuLS6IPhWdJr/XMl6gsjJ3X3TYKlosanyyCn +9iXZrIo/o+PcjD+voD4xZgHrStsAm5BK9EUAn1I1y7fIEmzTyJJfX+/MQHrdL4xXi7Sec/4gJ +C1jl+HsdipJ4eRHLmhVdlSADoOZe/Y15sZdHHnEbZ0ckSB+s1lMR0MXAgeTe6dZc71zZuetNk DpMk1KM1UZD0imiZTTX2xBDONXqSUTiIQcAWydfPEw6QQw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=qcGjM1AR4CU1xCRHk4db9l6Nnda5Gr5F9VOEi2E0JEs=; b=hkSt86Z7MzixZdCT2mjVuOCXv2 IZou7E/uVmeps2WMVxZNJ2oRSP2qAt3W8q9hCj/sLiODf6SLC8WJ8bnJR8VzS7SWT2FbG2N05/mOk p3j+EvZ1e7hu8Dn/mdi1GNF7bob3QH30cNhnTGSILR7dpd7onw6r8Bz08MtHhBrCuM0FeFEH8p8pG gNV2YVuA5o5DfjhQ9wr+lAwdtqHuHk0fUFHk0klnwlhCf2QCAsEQs2xRh8TNrQxDhOtw7IUfkLxkf 1TStSAHMLfQfxrBDCgli6FRjo054l+qzUPy++ExqWo8MX13DibK9yQK7YOBVg5+FfMiY5n1USWJIb e2ieHCdQ==; Received: from authenticated user by zero.zsh.org with local id 1lARlr-00075i-1E; Fri, 12 Feb 2021 06:17:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f175.google.com) smtp.remote-ip=209.85.167.175; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f175.google.com ([209.85.167.175]:40401) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lARlb-0006kw-1g; Fri, 12 Feb 2021 06:17:23 +0000 Received: by mail-oi1-f175.google.com with SMTP id 18so8921231oiz.7 for ; Thu, 11 Feb 2021 22:17:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=qcGjM1AR4CU1xCRHk4db9l6Nnda5Gr5F9VOEi2E0JEs=; b=cylzKfX+WqZBz+I4oI3y5qCuGGR6kSAPIy6dtDcXJhl7e2P9S49+suYkyd0Ckhe0Za bkutbQhdvAzaiEiPwuX3o7ntsFxg2AMM17h6wFjQcLwvlxZJ+e2mlPeBvMkKCp1EiXnO 9bKYFzeGdcCZ1HYvu6qtUXUrUYIxmkg6sfBNbIIDi+qGOQT6u2DHHRtN0ZHzmiixSTVg zN38gCvg9qZ/+O9Du+o6G7b/UmEVEqx8kNTi2xQ+PNhJ7XQiVDAvP5ScBtzgKTGmDCa3 cihlPopMc6VD2qiCjK8BgVSeNh6JTE+s4IjmL0E3vyRj1yneHlTgg0ng93JlMKa1Auna 6T9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=qcGjM1AR4CU1xCRHk4db9l6Nnda5Gr5F9VOEi2E0JEs=; b=olLC39CUE89QIrAHPWV4aSQYPgJ/wo08TBaBefPxFI484bKuGWxztB4fWzrZBZWVKM 5BcI8uYQsSrDQgKEak/3R26XoGIMikc+XfvUefKci5NeXUOdi6tqbYLxvFrhJ2XOHm32 tXfgz+pK2rDNsWxDVZiseMscpF0guH+vJTO+DvrHU5CZa9CUvV0JB6XSGHFeDeVBmBds Srfdslk2JtDriuGu+scHSuJJxqCumY3RBy4lLfEX+VC+WDGgAF+IR1c8BajKMdyy9VL/ aHSdQw+XJRBATqQY+PxHXp/5aVMSr0bunl4InUmMutpAEA9163xgTtyfTIaieT8We5oe UPAg== X-Gm-Message-State: AOAM531aXEWGxU6tEFaenZ/b9MEgIr0g3ggU4xLejJzsKac4Ch5PZ9BX sqNVn7q9oVcVp2re9HVyGMO1DrhsEIGoqNh6H1Zrapfwoy9Otg== X-Google-Smtp-Source: ABdhPJxwbTlxkJyAZYLjlZCGBZsmIOP6n1QJM/YKxb3WonIxEY0j+OIgvBlvUXRHyMoJEB8VpV9NviKaptgIwgQa9Gs= X-Received: by 2002:aca:808:: with SMTP id 8mr895113oii.84.1613110641592; Thu, 11 Feb 2021 22:17:21 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Thu, 11 Feb 2021 22:17:10 -0800 Message-ID: Subject: Re: Block comments ala Ray To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48011 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Tue, Feb 9, 2021 at 10:16 PM Roman Perepelitsa wrote: > > On Wed, Feb 10, 2021 at 7:05 AM Bart Schaefer wrote: > > > > !# This begins a block comment. > > This is merely rambling. > > This #! is the last line of the block > > This can be very surprising because it's not how block comments work > in other popular languages. I don't find that very compelling, because in shell the alternative is to prefix every line with "#", which is exactly what Ray wants to avoid. It might be possible to force it to look !# like this #! (that is, require newlines both before and after the delimiters), if that seems more friendly, but then the question is what !# this #! means (did the block end, and if it did not then ...)? > It also disallows inline comments -- > something I personally use in other languages. Do you have inline comments in the shell now? Do you only care about inline comments that don't contain newlines? As I mentioned, I experimented with print this <# is an inline #> comment because "<#" in any existing script would be a syntax error; but as soon as you allow newlines within the comment it becomes a verbose form of backslash-newline continuation, which felt wrong. Do you disagree with me about how strangely this -- print this <# part is a comment (lah-di-dah for perhaps hundreds of lines) but this part #> is the rest of the command -- implicitly behaves if the embedded newlines can be inlined? > I would go even further and say that the value provided by block > comments resides almost exclusively in enabling inline comments. I think Ray at least disagrees with you, since he's willing to abuse here-documents for the purpose, which also can't be inlined. Do you not use block comments to delimit expository paragraphs?