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=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17961 invoked from network); 9 Jul 2021 15:05:47 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 9 Jul 2021 15:05:47 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 1ess; Fri Jul 9 11:01:34 -0400 2021 Received: from abbatoir.myfiosgateway.com (pool-74-108-56-225.nycmny.fios.verizon.net [74.108.56.225]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 9ec0e2c5 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Fri, 9 Jul 2021 08:01:21 -0700 (PDT) Message-ID: <270BEC567655102DE0C764820FA16F74@eigenstate.org> To: 9front@9front.org Date: Fri, 09 Jul 2021 11:01:19 -0400 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: object-oriented element dependency event method Subject: Re: [9front] Re: commit 2f8a59f4b5bfe028c022855acc19666d69eed909 Reply-To: 9front@9front.org Precedence: bulk Quoth Stanley Lieber : > On July 9, 2021 3:48:39 AM EDT, Anthony Martin wrote: > >> rc: add subshell-function syntax > >> > >> fn foo @{bar} is now equivalent to > >> fn foo {@{bar}}. As a side effect, > >> this disallows creating functions > >> named after keywords without first > >> quoting them. > > > >Respectfully, this is just wrong. @ is a > >unary operator. Repurposing it to define > >a new special kind of function is a bit > >much. > > > >What does this buy you over being explicit > >at the call site? > > > > fn foo { bar } > > > > @foo > > > >One color of function is enough. What's > >next? > > > > fn foo !{ bar } > > > >to mean that foo always negates the exit > >status of its body? > > > >The new quoting requirement for functions > >named after keywords seems fine, on the > >other hand. But is it worth the backwards > >incompatibility? > > > >Thanks, > > Anthony > > > > if we're introducing breaking changes to important programs like the shell, can we please at least post a warning on the mailing list? (caveat -- it's compatible unless you happen to be using functions named '@', '`', etc -- which, again, you can't use without quoting.) I don't think most people even realize that it's possible to name an rc function: '@{this is a valid} function name!' Either way, noted -- I'll post next time.