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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 20094 invoked from network); 27 Apr 2020 03:39:10 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with UTF8ESMTPZ; 27 Apr 2020 03:39:10 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 973439C84C; Mon, 27 Apr 2020 13:39:04 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 100949B92D; Mon, 27 Apr 2020 13:38:34 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HKmoNgTc"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 9B0C69B92D; Mon, 27 Apr 2020 13:38:31 +1000 (AEST) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.50]) by minnie.tuhs.org (Postfix) with ESMTPS id 30A5094895 for ; Mon, 27 Apr 2020 13:38:31 +1000 (AEST) Received: by mail-ua1-f50.google.com with SMTP id z16so15929742uae.11 for ; Sun, 26 Apr 2020 20:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a4U/a6/Qlm+csZ8YN3O/5wdkm9uIcvSAmfHGViYxa10=; b=HKmoNgTcz4+aM7BR/oUMdSNtNKc+uAFQjp1Ewi2Qkfmsv/jmCjFWDKuhhnXo3/rktU bGtkP+dpcm++fQBhCYFag+zIjxN5Ye534s7ERIC1B/PmYQ0zEweypIlcVQHrn9UueAeO /ZmCEsq63GjeUupy3so198TQzLiIFPj8OtuB/2xkJO2DkoOWayPpJ8xsSsaWAOkXk4+U /rIbzwYkrq1VuoLqpGM6fvdo0u1yGfA3tCogDSTU/bupF8LFh9iO8eVPyDQc8nJJNO2F eKvRgby+rWWK3aAD1xf5QyzzRso3r9iaiJTIERk1eLPEDmSZlEr+jb0JILkdGcjp1Asu dRFg== 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:cc; bh=a4U/a6/Qlm+csZ8YN3O/5wdkm9uIcvSAmfHGViYxa10=; b=ha0sYdFcmgJDLymBgJzfOJRP9eykTglyk4n4vSsNEJ3AV0VkGMBRxY79yE9fymw6st DIM4R+zk/wGDglEQgexjJNvwRpKvpHaExPdH+RV+afwc0twqsCtE7i9heGD/WTar4lK5 uirUlbGDet9OL9zBmhg+9CD40VDJROHwlvs6Lp2rPwWtUr4zBPIZO/dEZ4tVius3zRrg 22uHH4IdpAQlaF06zk/OrNF1U059FonF4pzq4feh6dmYgmet9K4vDhb+1RsG8Ly/vsVn Ul6R6GMxlRw9+XDEgwSWFGsbFjCF1aszQvlEhVcOzQdHHPQxNxrjS+fuJQ/usR9sGYeK 70cg== X-Gm-Message-State: AGi0Pua/ai1dkgEtfRYCp4z9GDIV1HQ51STuvbTkeLmVjbnJX3HwS3kh IJf4+2MD7/09vvcb6H1EOsZDnVCmTN38DfiToY8= X-Google-Smtp-Source: APiQypJPl2pZolSHyiav2QQtAbtdMyUxLd42Gx3LHf4Qj+zblya2rA+ttTdoSD74y7bS3Aa+nC3ArFzO8/kEIWk3eqg= X-Received: by 2002:ab0:74cf:: with SMTP id f15mr14550028uaq.118.1587958710301; Sun, 26 Apr 2020 20:38:30 -0700 (PDT) MIME-Version: 1.0 References: <20200425180357.A004918C0B6@mercury.lcs.mit.edu> <20200426193704.GA87816@clarinet.employees.org> <20200426201044.GB87816@clarinet.employees.org> <62bd7be3-a608-f9fd-3544-8620802d4ac7@gmail.com> In-Reply-To: <62bd7be3-a608-f9fd-3544-8620802d4ac7@gmail.com> From: Rob Pike Date: Mon, 27 Apr 2020 13:38:18 +1000 Message-ID: To: Nemo Nusquam Content-Type: multipart/alternative; boundary="000000000000d876ee05a43d72b1" 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: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000d876ee05a43d72b1 Content-Type: text/plain; charset="UTF-8" Yes, that's the issue, which arose in C++ programs. The question at the time was whether C would allow the same syntax. Nothing to do with me. -rob On Mon, Apr 27, 2020 at 9:58 AM Nemo Nusquam wrote: > On 04/26/20 16:10, Derek Fawcus wrote: > > On Sun, Apr 26, 2020 at 08:37:04PM +0100, Derek Fawcus wrote: > >> 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. > > Actually trying it, while the above does the right thing, > > I can also get the following to compile with a modern compiler > > > > (*(*(*(*f)()->g)()->h)()->i)(); > > > > So maybe that was the answer? > > K&R 1, Sect. 6.2. (with no mention of Rob Pike's influence). > > N. > > > > > I guess I'd have to question why someone would wish to write > > such a construct, as error handling seems awkward. Even in > > the modern form. > > > > DF > > --000000000000d876ee05a43d72b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, that's the issue, which arose in C++ programs. Th= e question at the time was whether C would allow the same syntax.

<= /div>
Nothing to do with me.

-rob

On Mon, Apr 27, 2020 at 9:58 AM Nemo Nusquam <cym224@gmail.com> wrote:
On 04/26/20 16:10, Derek Fawcus wrote: > On Sun, Apr 26, 2020 at 08:37:04PM +0100, Derek Fawcus wrote:
>> No, I think he means something like:
>>
>>=C2=A0 =C2=A0 =C2=A0(*((*((*((*f)()->g))()->h))()->i))() >>
>> but I can't recall the relative priority of '*' and &#= 39;->' in
>> the above, so I may have added unnecessary parens.
> Actually trying it, while the above does the right thing,
> I can also get the following to compile with a modern compiler
>
>=C2=A0 =C2=A0 =C2=A0 (*(*(*(*f)()->g)()->h)()->i)();
>
> So maybe that was the answer?

K&R 1, Sect. 6.2. (with no mention of Rob Pike's influence).

N.

>
> I guess I'd have to question why someone would wish to write
> such a construct, as error handling seems awkward.=C2=A0 Even in
> the modern form.
>
> DF

--000000000000d876ee05a43d72b1--