From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 25687 invoked from network); 26 Apr 2020 19:45:10 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with UTF8ESMTPZ; 26 Apr 2020 19:45:10 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id DEDBF9C97A; Mon, 27 Apr 2020 05:45:05 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 22ACB9C95F; Mon, 27 Apr 2020 05:44:37 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id EF0B19C95E; Mon, 27 Apr 2020 05:44:34 +1000 (AEST) X-Greylist: delayed 449 seconds by postgrey-1.36 at minnie.tuhs.org; Mon, 27 Apr 2020 05:44:34 AEST Received: from clarinet.employees.org (clarinet.employees.org [198.137.202.74]) by minnie.tuhs.org (Postfix) with ESMTPS id 997289C95D for ; Mon, 27 Apr 2020 05:44:34 +1000 (AEST) Received: by clarinet.employees.org (Postfix, from userid 1736) id 7DAF74E11CAD; Sun, 26 Apr 2020 19:37:04 +0000 (UTC) Date: Sun, 26 Apr 2020 20:37:04 +0100 From: Derek Fawcus To: tuhs@tuhs.org Message-ID: <20200426193704.GA87816@clarinet.employees.org> References: <20200425180357.A004918C0B6@mercury.lcs.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200425180357.A004918C0B6@mercury.lcs.mit.edu> Subject: Re: [TUHS] v7 K&R C X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Sat, Apr 25, 2020 at 02:03:57PM -0400, Noel Chiappa wrote: > > From: Rob Pike > > > To make chaining of calls simpler. Write > > f()->g()->h()->i() > > the other way > > You mean: > > (*f)((*g)((*h)((*i)()))) > > I dunno, it doesn't seem that much worse to me. No, I think he means something like: (*((*((*((*f)()->g))()->h))()->i))() but I can't recall the relative priority of '*' and '->' in the above, so I may have added unnecessary parens. Or was he thinking of having to use '.' as well to access the member pointers within the structs? DF