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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23881 invoked from network); 22 May 2020 20:20:16 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 22 May 2020 20:20:16 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id B488D9C69A; Sat, 23 May 2020 06:20:13 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 906E09C5EB; Sat, 23 May 2020 06:19:53 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 1B8E69C5EB; Sat, 23 May 2020 06:19:52 +1000 (AEST) Received: from pio-pvt-msa1.bahnhof.se (pio-pvt-msa1.bahnhof.se [79.136.2.40]) by minnie.tuhs.org (Postfix) with ESMTPS id 5A2939C194 for ; Sat, 23 May 2020 06:19:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 5A66342189 for ; Fri, 22 May 2020 22:19:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bahnhof.se Received: from pio-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uKi7n6vtx9F0 for ; Fri, 22 May 2020 22:19:45 +0200 (CEST) Received: from localhost (unknown [155.4.14.29]) (Authenticated sender: mc327956) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id 0A77B42187 for ; Fri, 22 May 2020 22:19:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by localhost (Postfix) with ESMTPS id 446112E032E for ; Fri, 22 May 2020 22:19:44 +0200 (CEST) Date: Fri, 22 May 2020 20:19:43 +0000 From: Michael =?utf-8?B?S2rDtnJsaW5n?= To: tuhs@tuhs.org Message-ID: References: <20200521182817.08C0318C093@mercury.lcs.mit.edu> <202005221109.04MB92D3016090@freefriends.org> <22671.1590172811@hop.toad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <22671.1590172811@hop.toad.com> Subject: Re: [TUHS] History of popularity of 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 22 May 2020 11:40 -0700, from gnu@toad.com (John Gilmore): > Whereas in C++, Pascal, Python, APL, etc, a few characters can cause the > generated code to do immense amounts of unexpected work. Think of > string compares, hash table types, object initializers, or arbitrary > amounts of jumping through tables of pointers to different kinds of > objects. Automated memory allocation. Garbage collection. What you wrote is pretty much my take on the subject as well. However, part of me wants to say "let's not compare apples to airplanes just because both start with 'a' and one can typically be placed within the other". C++ adds a ton of features on top of C, never mind early C, though for the features that at least earlier C has (I'm honestly not sure about the newer additions), C++ has very similar or downright identical syntax compared to C. As long as you stay with the basic C feature set, I strongly suspect that most programmers who can follow along in the C to assembler to machine code compilation process, can do much the same thing with C++. It's when you start piling all the extras on top of it that things get hairy from a code generation perspective. Vectors? Function overloading? Exceptions? RAII? Try predicting the execution order of destructors during exception handling for classes with multiple inheritance where multiple inherited-from classes define destructors. Anything else? :-) -- Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”