From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [50.116.15.146]) by inbox.vuxu.org (Postfix) with ESMTP id 843132B14A for ; Mon, 30 Sep 2024 20:09:40 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id B90F4436C0; Tue, 1 Oct 2024 04:09:39 +1000 (AEST) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by minnie.tuhs.org (Postfix) with ESMTPS id 1EB59436BF for ; Tue, 1 Oct 2024 04:09:37 +1000 (AEST) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2f75aaaade6so46874631fa.1 for ; Mon, 30 Sep 2024 11:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727719775; x=1728324575; darn=tuhs.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1SBmnUq3VpjbpSLFT2px/vlf7DcL8NzMUxV85goJNA4=; b=Y16YR2u98sxoVR6XLMaZ17Uni8FfeW4Gdv0L8jFtEK0rz9em0xCH6GRfuH3J7K5i8L 26v7dTDVXzGxQM0UO0Y+6RL7KTh0CH/Q5fsXPfJ58ukjuGlbfHIP3JUoczXmUZGcr4pC Cj5nPQTjRZOPFNz9XSrIE/ukAyXePb+ShWJfcGEbmOcLRxhLqF3AcZ8C9HLaT5y/XhXi 4NyqabsSViTUnwqM9/K2njsjSF653d80j8LWZAYeojzwZGJg8tg+6OwIJFxPvVzqHYPO qV+7+2QGW/PiNbaCzVKUMPErD4rX4tZCpbO3Nr0KmTVhAokKBwRcK2AgmAfoqhxA9FS8 u87w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727719775; x=1728324575; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1SBmnUq3VpjbpSLFT2px/vlf7DcL8NzMUxV85goJNA4=; b=Ktzo+jGUfjFAp/OQ4o4F9vY9lwqFI/ZHAr9Vek8MFJWD02hBAbRLUjrGHsP4B4/8SH HXt7p8CachHR861/uf8SY1z2M046kzLciJQ2Fe9iQvf1hQVi2X3VYqjvlvQVT1mjbRCB ePUeanOO0YXlBW0oTrm83e6dwS5RkAtIOmkWtmzsZXVaHp3rdYnrs18mbUVSdsvzPJ0q 3zvNXh40LhbeelZXJQC+ti+X/Yqw7lU0XO1lH7JfZ4Oh2tRmwq3Dx/f2u1+Qbx36gLS8 8ehDqzQ4htDhhRFnG8u6exeJZ0D00+BwFueXOp8GJnPmEuk7ozrLrganRsFKD5CfftJH LwPA== X-Forwarded-Encrypted: i=1; AJvYcCU25mul4Me3VK8j4xlVKda9iOVcie8zVsir4NISRfrdzNSR0gxcijUEw2KwUcoOkOUho++V@tuhs.org X-Gm-Message-State: AOJu0YyUHnlo/qVnQA5hyuI2cwKmiXmpD3R+6Ko2sng6Q32F3r1MslvC 4WhuRBEyKlT4ZkZrOwFlEfhdna+7eGes6cUfRBpBMRkUEvN3b9q2ln6DMDFHQ1EdZlp9JIY+G2S S9SRo7dPI7nYkBdx5Wk8gEiXzfJBgkQ== X-Google-Smtp-Source: AGHT+IE2tmldLVqhhN0gheTae+sbsEDr3hzUrJkMdWDZ+AbNDwd72evLyuuknMsuvob4QqigXffvY3GWydHJXivqRl4= X-Received: by 2002:a2e:a592:0:b0:2f3:b078:84bc with SMTP id 38308e7fff4ca-2f9d3e3a333mr69569551fa.4.1727719775014; Mon, 30 Sep 2024 11:09:35 -0700 (PDT) MIME-Version: 1.0 References: <20240928165812.4uyturluj4dsuwef@illithid> <20240928180559.GF9067@mcvoy.com> <20240930175949.GI17434@mcvoy.com> In-Reply-To: <20240930175949.GI17434@mcvoy.com> From: Dan Cross Date: Mon, 30 Sep 2024 14:08:58 -0400 Message-ID: To: Larry McVoy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: PMZQA6NTPA5DY4ETGDIM4J6QHZMCRUR2 X-Message-ID-Hash: PMZQA6NTPA5DY4ETGDIM4J6QHZMCRUR2 X-MailFrom: crossd@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Paul Winalski , Computer Old Farts Followers X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Re: [TUHS] Re: Minimum Array Sizes in 16 bit C (was Maximum) List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, Sep 30, 2024 at 2:07=E2=80=AFPM Larry McVoy wrote: > On Mon, Sep 30, 2024 at 11:49:28AM -0400, Paul Winalski wrote: > > [moving to COFF as this has drifted away from Unix] > > > > On Sat, Sep 28, 2024 at 2:06???PM Larry McVoy wrote: > > > > > > > I have a somewhat different view. I have a son who is learning to pr= ogram > > > and he asked me about C. I said "C is like driving a sports car on a > > > twisty mountain road that has cliffs and no guard rails. If you want= to > > > check your phone while you are driving, it's not for you. It require= s > > > your full, focussed attention. So that sounds bad, right? Well, if > > > you are someone who enjoys driving a sports car, and are good at it, > > > perhaps C is for you." > > > > > > If you really want a language with no guard rails, try programming in > > BLISS. > > > > Regarding C and C++ having dangerous language features--of course they = do. > > Every higher-level language I've ever seen has its set of toxic languag= e > > features that should be avoided if you want reliability and maintainabi= lity > > for your programs. And a set of things to avoid if you want portabilit= y. > > > > Regarding managed dynamic memory allocation schemes that use garbage > > collection vs. malloc()/free(), there are some applications where they = are > > not suitable. I'm thinking about real-time programs. You can't have y= our > > missle defense software pause to do garbage collection when you're tryi= ng > > to shoot down an incoming ballistic missile. > > That's why I like reference counting. It doesn't have the long pauses > that other garbage collection systems have, when the variable goes out > of scope, you decrement, last guy frees. Seems pretty simple. The problem with ref counting is that it's not completely general; circular data structures will never be collected, even if all external references to them disappear. That said, reference counting is a really powerful technique; it's just that it must be used carefully. - Dan C.