Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1427750rdd; Wed, 10 Jan 2024 21:09:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHA+HrNkAGTYTFO+BqPuXB2sECfreKiFsXqLXXkeF5/VQK9eJjsoMUMygjwH4G87WchMij+ X-Received: by 2002:a05:620a:2623:b0:783:bf6:b374 with SMTP id z35-20020a05620a262300b007830bf6b374mr888091qko.118.1704949765245; Wed, 10 Jan 2024 21:09:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704949765; cv=none; d=google.com; s=arc-20160816; b=nJIAj4ovIJjnwNIr5/d3tLhdWVn1hjXs2qHBhc3wjxtHxmmogpe9qpStrutM0ETOJU HPn3SE2L27LWcsLsOK0olfjnCUrSxeleDTD98yB60l9iNaRmbw691w3Mc8ZPUbF7h4sd dsO8n0/caO1ageu9eDH0C1W9iWmgHelUsKPT558uklwSWJ5JmUnQOFW9lHOUUlRuSC/H W8xsuguaS2zp2JNY0/EZ/e59NOY3F5HfKEx1fa780sttFtJmk/1NrHfe8gJ+idPhXCJZ aS3YqDwzkkYhYTOKbui3T+7cSmw2jcRSs7/RYenUHBFa2RS04iWngwNeAm0XDEl6eDiG sT3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=9MKrB6z6h6FCL7Pjwb6W+0zbLJ1lLA75vK6XbRw6+sM=; fh=HYGXz40kufhg3IBlbtT+hregCs8U6Q5tO63UuIYo+MA=; b=KJIV9y3GjUN9dDPekaZHBUZFKjdqJHPcYrFViIhpJp7aCtDwZPyb6qVQStRDd2iZbT l/wK41+wQ5CiZGMgzTZQn3zZm5vyq/LbSuFj6eGQMU91Zbd24M9c3dy2uS7l0eNVBn3W iCKjlf89ObC1RSKcE/EqpEnUHgDbP6ySzULIHVZTLnm0P5B/XJ5M6lYkR349ApxcXzLB nKLa+DzFD0PgVIMoS0wKCmRzKrYArJADoXJIsUHo0TLWxtRw+qeBg4sD0qOB0nrI4Xu8 Nf988G7crJF/bVdNbj/cOCDZXQJOmtoI6OgvGF+qkfgsWqqicC4MHZ06oC5NXfFfBA3S eosQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Bcs58dBG; spf=pass (google.com: domain of linux-kernel+bounces-23068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w21-20020a05620a445500b0078343867695si100563qkp.267.2024.01.10.21.09.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 21:09:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Bcs58dBG; spf=pass (google.com: domain of linux-kernel+bounces-23068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 01EB21C23311 for ; Thu, 11 Jan 2024 05:09:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 903D91FD2; Thu, 11 Jan 2024 05:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bcs58dBG" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34E1C17F1 for ; Thu, 11 Jan 2024 05:09:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a2a17f3217aso547366166b.2 for ; Wed, 10 Jan 2024 21:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704949754; x=1705554554; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9MKrB6z6h6FCL7Pjwb6W+0zbLJ1lLA75vK6XbRw6+sM=; b=Bcs58dBGPuyHFbj/C8CGutI/YZmAVibVBC+ftbwMeum42qy1n76rQUZg/j+1dLhQlV JQe4JXKVCR+zqAOvWDH6m5d9kYVlsSoqBVk9HzfMVYC1Px49VUpmIyhJHAzaKA+8TYPL Vx5YkegOrxbFqJuYdvO6FlUmlLCR3GuwHq5HWNWXV2Akm3GcHyoAyN2F5DYLFAXLwo3r hBKpvwC5IatNpem40XeTSR1NNNiEqVO81E7ZKERD0VjvwTWJMOIA4OIKP4bl9a7jIK9D EGoZ9n9q31KoopED/tFlc+PObGn3QIcflAZvoF5oQDwjUKVeVBhe7X+ITNN/1wmxgszs iDSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704949754; x=1705554554; h=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=9MKrB6z6h6FCL7Pjwb6W+0zbLJ1lLA75vK6XbRw6+sM=; b=W/fIx19dExkBA8gDOORaayaLfaT4hdLU5uZe5AczZS4kjy0SrRiiTG5QUhjX55trfZ NkB/5g6sowh6/94pXOUunuZ2z9AmDFjVbeOa9aSmxkKduOFDsHxCtoP6PYREktrRLrGc 5RAZr/ijVkvyE4K5sawCrDm8YEsU0EpBxANDCTSKnUg4GTmc4FVWZCypwGhpLr5BMORY 36opfUcf+ECgn/Uva6W7+d0H9Av2eBSBnb++uXFoZG2ciK/0/ysPu5INSVjVaa37onOF 9QknUZdKecwvH6J0WBhmpHYs09cFDvp4z6C/vpuk02QZPm+RL8oQXAmzWsiDSwV7CnzA JBUQ== X-Gm-Message-State: AOJu0YzZOvcbjwDZ6Nj/3wkkFIUCiuo9MNk+mQsNeqSXkruqQ9UH2YOH +plCsd8RSxfp2Koyq2qRrwDV1DhI7zp+xDpq4Fo= X-Received: by 2002:a17:906:241b:b0:a22:e690:f09f with SMTP id z27-20020a170906241b00b00a22e690f09fmr280341eja.143.1704949754221; Wed, 10 Jan 2024 21:09:14 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <152261521484.30503.16131389653845029164.stgit@warthog.procyon.org.uk> <3465e0c6-f5b2-4c42-95eb-29361481f805@zytor.com> In-Reply-To: From: Dave Airlie Date: Thu, 11 Jan 2024 15:09:02 +1000 Message-ID: Subject: Re: [PATCH 00/45] C++: Convert the kernel to C++ To: John Hubbard Cc: "H. Peter Anvin" , David Howells , linux-kernel@vger.kernel.org, pinskia@gmail.com Content-Type: text/plain; charset="UTF-8" > There was an effort to address this, and I remember we even tried to use > it: Embedded C++ [2]. This is very simplistic and completely out of date > compared to what is being considered here, but it does show that many > others have had the same reaction: the language is so large that it > wants to be constrained. We actually wrote to Bjarne Stroustrup around > that time and asked about both embedded C++ and coding standards, and > his reaction was, "don't limit the language, just use education instead". > > However, in my experience since then, that fails, and you need at least > coding standards. Because people will use *everything* they have available, > unless they can't. :) You don't just need coding standards, you need a compiler that refuses to compile that stuff. If you want C++ to do what Rust could do, then you need the compiler to stop the stupid before you can even write it, otherwise people will still write the bad stuff and code review won't catch it all. Can we get memory safety with C++ now? and also stop people coding C++ like it's 1994? Kernel C has kinda become a thing without enforcing it, but C wasn't really stopping anything bad, so having C that isn't quite kernel C get into corners isn't that bad, but introducing C++ without any history of kernel C++ is just asking for everyone to do their own special things and defend their usage of every corner of the language because they wanted to learn it. Dave.