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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 3120 invoked from network); 25 Apr 2020 03:31:18 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with UTF8ESMTPZ; 25 Apr 2020 03:31:18 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id A61269C853; Sat, 25 Apr 2020 13:31:15 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id CD9879C733; Sat, 25 Apr 2020 13:30:42 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ccc.com header.i=@ccc.com header.b="HWeVeZwQ"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 451BE9C733; Sat, 25 Apr 2020 13:30:40 +1000 (AEST) Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by minnie.tuhs.org (Postfix) with ESMTPS id 4B3A39C171 for ; Sat, 25 Apr 2020 13:30:39 +1000 (AEST) Received: by mail-qk1-f174.google.com with SMTP id l78so12430973qke.7 for ; Fri, 24 Apr 2020 20:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w938QCyCdYBRg5CNjKbugHwJC1T1kzI1ghm1qZqT3PU=; b=HWeVeZwQc37kARL3A963KWIZQKbOpYK2JzDztor3Av0NFQe77qpHNfi9+XmfJBpv5m +rD4+nNZzSqSQ2xbbjoQDb4oM9+ygyQbRM31bthxhyDs84Bck/OLmlSDbrfrJY+xphbN 73Rg+iAxvSt0hoPhOSK/ae5xyBHAI+koFTyB8= 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=w938QCyCdYBRg5CNjKbugHwJC1T1kzI1ghm1qZqT3PU=; b=ZnLkg/n1gFhmpj39xMnodcJzbBhF63iI4LyKfA05WfUkoivP7h1tBBhwzmKMJoFuA3 69OxWPJ7pbTr9nogUtyU3DyATeD9WdiVUrssSOasB2IbglFBToRZq7h3bmKjnX17A28c SL2Bi2SMFLdhuwoO5fhoEx6w1heVYWxsCOikAeMNJmU2ZAwFgFBki3F/OJQi/L/gVtmK fM9ZlUaDt2er9SZRlLGKjlfL03U5Ly+G6/OyZB5MdFAUTNz1+/2dD9mtM+3+lowScxrG 4GG056LXXp0RI8X1P/eoON5NFlOKGXx48IM6VeFKsjOIWRb9L94BAkNnNCVenFf0szsF 4Txw== X-Gm-Message-State: AGi0PuZregEgzqeyEgNc6YwVd5WuUDkK+XHMhrAl0eSzq/5dSMEFEhJ9 DPUoEtGdu6hYn4kxWi/c3MwJmTmHBF5V+sxzI3//aztipYU= X-Google-Smtp-Source: APiQypIzidwGNGjHD6UatJjTv2JjiX2oN+oxGLsOnSVc4YEX2DfOHRkuqdP2xCWhqVQLGHzYMJWHmZbGdGKM/Ql+pqI= X-Received: by 2002:a05:620a:1095:: with SMTP id g21mr11995688qkk.476.1587785438079; Fri, 24 Apr 2020 20:30:38 -0700 (PDT) MIME-Version: 1.0 References: <6D6EFA0C-36C3-4225-A331-D1998A07C50A@gmail.com> <20200425030436.GF30547@mcvoy.com> In-Reply-To: <20200425030436.GF30547@mcvoy.com> From: Clem Cole Date: Fri, 24 Apr 2020 23:30:26 -0400 Message-ID: To: Larry McVoy Content-Type: multipart/alternative; boundary="00000000000004425205a4151b51" 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: The Eunuchs Hysterical Society , ak@akkartik.com Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --00000000000004425205a4151b51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Amen bro. I always felt that they got added because pascal had something that C didn=E2=80=99t, and yet it really was not the same. I always felt t= hey were a feature that was only partly implemented and if they were not going to be fully typed then just leave them out and use cpp like we had always done before. On Fri, Apr 24, 2020 at 11:05 PM Larry McVoy wrote: > I hate enums. I thought they would be type checked and they are just int= s. > I love C but enums suck. > > On Sat, Apr 25, 2020 at 12:54:27PM +1000, Rob Pike wrote: > > Another debate at the time was caused by a disagreement between pcc and > cc > > regarding enums: are they a type or just a way to declare constant? I > > remember getting annoyed by pcc not letting me declare a constant with = an > > enum and use it as an int. I protested to scj and dmr and after some > to-ing > > and fro-ing Steve changed pcc to treat them as constants. > > > > Not sure it was the right decision, but C desperately wanted a non-macr= o > > way to define a constant. I'd probably argue the same way today. The re= al > > lesson is how propinquity affects progress. > > > > -rbo > > > > > > On Sat, Apr 25, 2020 at 12:51 PM Rob Pike wrote: > > > > > The ability to call a function pointer fp with the syntax fp() rather > than > > > (*fp)() came rather late, I think at Bjarne's suggestion or example. > Pretty > > > sure it was not in v7 C, as you observe. > > > > > > Convenient though the shorthand may be, it always bothered me as > > > inconsistent and misleading. (I am pretty sure I used it sometimes > > > regardless.) > > > > > > -rob > > > > > > > > > On Sat, Apr 25, 2020 at 12:48 PM Adam Thornton > > > wrote: > > > > > >> > > >> > > >> On Apr 24, 2020, at 7:37 PM, Charles Anthony < > charles.unix.pro@gmail.com> > > >> wrote: > > >> > > >> > > >> > > >> On Fri, Apr 24, 2020 at 7:00 PM Adam Thornton > > >> wrote: > > >> > > >>> This doesn???t like the function pointer. > > >>> > > >> > > >>> $ cc -c choparg.c > > >>> choparg.c:11: Call of non-function > > >>> > > >>> Perhaps: > > >> > > >> (*fcn)(arg); > > >> > > >> > > >> We have a winner! > > >> > > >> Also, Kartik, dunno where it is on the net, but if you install a v7 > > >> system, /usr/src/cmd/c > > >> > > >> Adam > > >> > > >> > > -- > --- > Larry McVoy lm at mcvoy.com > http://www.mcvoy.com/lm > --=20 Sent from a handheld expect more typos than usual --00000000000004425205a4151b51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Amen bro.=C2=A0 I always felt that they got added be= cause pascal had something that C didn=E2=80=99t, and yet it really was not= the same.=C2=A0 I always felt they were a feature that was only partly imp= lemented and if they were not going =C2=A0to be fully typed then just leave= them out and use cpp like we had always done before. =C2=A0

On F= ri, Apr 24, 2020 at 11:05 PM Larry McVoy <lm@mcvoy.com> wrote:
I hat= e enums.=C2=A0 I thought they would be type checked and they are just ints.=
I love C but enums suck.

On Sat, Apr 25, 2020 at 12:54:27PM +1000, Rob Pike wrote:
> Another debate at the time was caused by a disagreement between pcc an= d cc
> regarding enums: are they a type or just a way to declare constant? I<= br> > remember getting annoyed by pcc not letting me declare a constant with= an
> enum and use it as an int. I protested to scj and dmr and after some t= o-ing
> and fro-ing Steve changed pcc to treat them as constants.
>
> Not sure it was the right decision, but C desperately wanted a non-mac= ro
> way to define a constant. I'd probably argue the same way today. T= he real
> lesson is how propinquity affects progress.
>
> -rbo
>
>
> On Sat, Apr 25, 2020 at 12:51 PM Rob Pike <robpike@gmail.com> wrote:
>
> > The ability to call a function pointer fp with the syntax fp() ra= ther than
> > (*fp)() came rather late, I think at Bjarne's suggestion or e= xample. Pretty
> > sure it was not in v7 C, as you observe.
> >
> > Convenient though the shorthand may be, it always bothered me as<= br> > > inconsistent and misleading. (I am pretty sure I used it sometime= s
> > regardless.)
> >
> > -rob
> >
> >
> > On Sat, Apr 25, 2020 at 12:48 PM Adam Thornton <athornton@gmail.com>
> > wrote:
> >
> >>
> >>
> >> On Apr 24, 2020, at 7:37 PM, Charles Anthony <charles.unix.pro@gmail.= com>
> >> wrote:
> >>
> >>
> >>
> >> On Fri, Apr 24, 2020 at 7:00 PM Adam Thornton <athornton@gmail.com> > >> wrote:
> >>
> >>> This doesn???t like the function pointer.
> >>>
> >>
> >>> $ cc -c choparg.c
> >>> choparg.c:11: Call of non-function
> >>>
> >>> Perhaps:
> >>
> >>=C2=A0 =C2=A0 =C2=A0(*fcn)(arg);
> >>
> >>
> >> We have a winner!
> >>
> >> Also, Kartik, dunno where it is on the net, but if you instal= l a v7
> >> system, /usr/src/cmd/c
> >>
> >> Adam
> >>
> >>

--
---
Larry McVoy=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 l= m at mcvo= y.com=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0http://www.mcvoy.com= /lm
--
Sent from a handheld expect more typos t= han usual
--00000000000004425205a4151b51--