Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1108866ybt; Sat, 20 Jun 2020 00:59:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwATTu7nViVnHhs53ZcVzWPIm6Gx8Q5IuBnvP3Kzq/WLRpQmMJxpftWPduGI+l32AcEYfWY X-Received: by 2002:a50:ec1a:: with SMTP id g26mr6888764edr.289.1592639981059; Sat, 20 Jun 2020 00:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592639981; cv=none; d=google.com; s=arc-20160816; b=AAHSPheFX2Dg8vrcU7QVuRzECGfAiLQi0MIRzcd0tFJzJ59WSWiDeex7QHjS2QMVUV z6CqpNCrfJjNnEf/XQ4G773T6W7+A6eMDvfjDMFAjHYxc5aKGhfSGOo9mR57q1M+f4NA dUyiEMmnJxXi9bYmLp6awGwIZMLwqB0s7FAv1Y9iaz662jMUKSdSehVQetFg6wcxMMPs eEJuWtVMOWSTVF/YyQ2+HObHZ26WTuKkdmzZYrUPWPcS708WcWYIP2rXGSdrqMlwekcp HR6SRXCrs433dNna3ZD6P2u7n/OxZ7L9v8Qc3JcOY3sXfng3tBWQpk57TlP3xc3BOtEy Gj9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+ni8LF6DiZ7e+Sa1bH9I96UUmF2BBDFC3xDwZDcw058=; b=NiLH7R5rxfm3FOy/hUyuwZPpJhnHyAKXSJnKGN2HCqMXArxusfqEp+ntZocwuLIMl7 Wr/V7NdefPh/znXlTFrVJG1kjZgdnUfTEKITHVzeqg/objEDfoLxtx0898/C7mBKuqIV GNJUSkKtgelR8mT6jcsHGxySxqjsPBi6oVbscFPw6h0QRD1sbwnFkcnWzjUgt4EEwhvw 42jOirJLCuyAaBWa3d6z1zH6iC5SjTPZ2zYtbbylk5uDM6bEfBG5g8qfA3E0rmTvhB8j hS5BA0Adgb/qnDvK5HHY/CsPuoRqGUvSkwInsyDZZZ0kpj2v8drYw9xXS6+rO+PzaRVC IjzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NiF4Ek5J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v17si7217400ejk.506.2020.06.20.00.59.18; Sat, 20 Jun 2020 00:59:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NiF4Ek5J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727123AbgFTH5h (ORCPT + 99 others); Sat, 20 Jun 2020 03:57:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725835AbgFTH5g (ORCPT ); Sat, 20 Jun 2020 03:57:36 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86579C06174E; Sat, 20 Jun 2020 00:57:36 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id l10so11754937wrr.10; Sat, 20 Jun 2020 00:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+ni8LF6DiZ7e+Sa1bH9I96UUmF2BBDFC3xDwZDcw058=; b=NiF4Ek5JpVCT1lkixtJWNHFOi/+jzvu5yqUj3bVi28nBXxd1qGW6SwIjRWQsHVZvQ1 /sN9tsPubXkYpuqaIOe2WnxiwZqgQAakf0KNEk2oKNHTdNO+l1Oj0svHDl4FSnAMkWg0 sjQSuriza/6E772gnStLKc8Dd+ZP24hlrXp1pQFOacPEJCRv7X5MnaV2n105XjmEVS+c 7t4HeE/LZWVXKY6rYGMkUtcMqVNx8jBnpGXPoNYK8/OBSesF0B3kuXHEPqVIuQQhwKza R6ye/M+q2rTGF6UJbvBK0WlWpo0wqfwIYsh4RMJFfuYb/4J3XwOTd1Pg3Q/A8JtMiS5J KJRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+ni8LF6DiZ7e+Sa1bH9I96UUmF2BBDFC3xDwZDcw058=; b=effKCyDlDQeCPgiqd8WfGrAECWCVwvDTEwI3tOhp8P5FfsQ87uUT84LR+RHXjXNAlC OUZieR9ZY6oWk1KKQ84PvTxmtGML20GOO4NWVcsFpMeN/lFKqy/yesRYyQ6wK38dzWQ9 HUPwtESq3r1zm+EmWXR4H2n/lDLIeM/L7zIEkjQsiauDPGcYSzv7fSSKZW4FYp3jC/wP DLGqMbQs8AsmnR0CnV8lDqRymQCsGr4gnwe36vTcglZYSTvHSfcFUzJyd/i6GPlH0pAo kJHdL+Vxk76i+jVSQkOrR/DpDTk1g1cfItD1fVa+KmVJyxocAHlwC60Zl1GcG0gmXEcp Mfvw== X-Gm-Message-State: AOAM5301EQOHZmcA4V322O5uBJDtPlhv84AxgyNjEYoUF7qU5y51T2n4 FJ3QPIltlsEqHpAd+zdEJ2SkpGQ= X-Received: by 2002:a05:6000:128e:: with SMTP id f14mr8750971wrx.276.1592639855172; Sat, 20 Jun 2020 00:57:35 -0700 (PDT) Received: from localhost.localdomain ([46.53.252.34]) by smtp.gmail.com with ESMTPSA id e25sm10429252wrc.69.2020.06.20.00.57.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jun 2020 00:57:34 -0700 (PDT) Date: Sat, 20 Jun 2020 10:57:32 +0300 From: Alexey Dobriyan To: Linus Torvalds Cc: Linux Kernel Mailing List , Netdev , linux-arch , NetFilter Subject: Re: [PATCH] linux++, this: rename "struct notifier_block *this" Message-ID: <20200620075732.GA468070@localhost.localdomain> References: <20200618210645.GB2212102@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 19, 2020 at 11:37:47AM -0700, Linus Torvalds wrote: > On Thu, Jun 18, 2020 at 2:06 PM Alexey Dobriyan wrote: > > > > Rename > > struct notifier_block *this > > to > > struct notifier_block *nb > > > > "nb" is arguably a better name for notifier block. > > Maybe it's a better name. But it doesn't seem worth it. > > Because C++ reserved words are entirely irrelevant. > > We did this same dance almost three decades ago, and the fact is, C++ > has other reserved words that make it all pointless. The real problems are "class" and "new" indeed. > There is no way I will accept the renaming of various "new" variables. I'm not sending "new". > We did it, it was bad, we undid it, and we now have a _lot_ more uses > of 'new' and 'old', and no, we're not changing it for a braindead > language that isn't relevant to the kernel. > > The fact is, C++ chose bad identifiers to make reserved words. > > If you want to build the kernel with C++, you'd be a lot better off just doing > > /* C++ braindamage */ > #define this __this > #define new __new > > and deal with that instead. Can't do this because of placement new. > Because no, the 'new' renaming will never happen, and while 'this' > isn't nearly as common or relevant a name, once you have the same > issue with 'new', what's the point of trying to deal with 'this'? I'm not sending "new". There is stuff which can be merge without breaking source compatibility and readability of C version: private => priv virtual => virt this => self (in some contexts) and those which can not. I'm not sending the latter.