Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1472627ybt; Sat, 20 Jun 2020 11:23:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKTfKlX7/1EqAK+NtjtXvyLCf6yUYxpSWQVo9aWxxYCI814Xdb8HNedS/qfv34PINnJKXp X-Received: by 2002:a17:906:4d18:: with SMTP id r24mr8627827eju.222.1592677381546; Sat, 20 Jun 2020 11:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592677381; cv=none; d=google.com; s=arc-20160816; b=FBAX3floMMm2Kgax7P+s/8CG/7TQoCqE3JrTFTlmHjGtdU4qeAzID+e9pISyAPJboS j2h1N1JMgF9WNoXzEkhZBuloAGsYCMnnBg9VlYeHCwW5vwpDAxFLKRvCZ94VChCxZJg9 OaTZbptkkvYXFNQdmajj5OCSNyyI5Pivybc+Bs6Bixdej2SixwR3VnXb+/e8YGeJNkJn FdL6zQnH+VUjlvpT3gg5rGE+kDF8HwbQvc8HFXbs29yu/qLXRYPt4Egvr0JIWA0elGGb ueIFBLynDUaNfSjiBV35GdSG7c3zydEwlJUtHXHQruBWBprgTAilgwOnEZGrQvaQfXeh nMYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fvNVjKHLtWO1dFhcir+/iDU+Lfgpi6JKmP8lzEdvB4E=; b=Nas++V3+YHy/Y/Ge0urOMZku4CrWI9L0HdCo2Jwqruwr25d2D53EYQIvQ1ccPr8O+n 1aG1sjAFUoS3Y71jj1jdoDCkvXrgqP6acg+PmDJAbMQKQOIpcwlq8ElXYDciqsg+eAgo tWxfI+coW/tNyhZzLhPjTaAAPeMFkKYT1kf0C5DmwSbjUpvZ8h3F17G5rLvtvBmBEZOq LwZfNEqgMwcVVYFvvtIsX5yFJ2SoIRPFr9e+iV7S6krKx9NB4JqVN6SHRMcw+fL9Rpq1 5iSNZMIbg/+KBj6c7JFWBM9dCb5kqQLs2op5Zalbho+CG22Lb6UyaVJXQvG3qLYsChPS 1IBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XZhtEb+0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d22si6338563edv.113.2020.06.20.11.22.38; Sat, 20 Jun 2020 11:23:01 -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=@linux-foundation.org header.s=google header.b=XZhtEb+0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728424AbgFTSR7 (ORCPT + 99 others); Sat, 20 Jun 2020 14:17:59 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41251 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728406AbgFTSR4 (ORCPT ); Sat, 20 Jun 2020 14:17:56 -0400 Received: by mail-lj1-f196.google.com with SMTP id 9so15024011ljc.8 for ; Sat, 20 Jun 2020 11:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fvNVjKHLtWO1dFhcir+/iDU+Lfgpi6JKmP8lzEdvB4E=; b=XZhtEb+0zgTmk7p1FKGgpCykCJGCR4QhBQlCJIvFhX2gO0uR1pqoBoOBIBXk8xm1oo nnYsLEAqabKP6xPYAXRe3MXkcyadqTMH+s5IProFdvebzb7pzQ6AkXwlDow2qmIdedzm oZw5CZPotJ22BL1wUHzVnLaBOGBVpYDODO31o= 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=fvNVjKHLtWO1dFhcir+/iDU+Lfgpi6JKmP8lzEdvB4E=; b=T5WXmHiC0OIqtLjcI+uIAfAKOJ6d+GXnAfJaTeezupQJrHgr6JDyNtbZYJuoBH2MC9 YgetSb8VICp3Jd2xo9KmhVRE6d0DvPjH35ns3oP8EB8n8BUx9PvR19lu/5w0u7xhQFWP oaMJnGrm8FwglpinKFt1oR+H8zNfVVMnrXbqgEuzaqtycXX1gNz6xe6NiFSVvN01A97r 0hcnWFoMChHdR98Taxve2xE+QwZk/C9bTU92NQLr5a6SBPRqtNu28CrKNHWfCbWeZm1F G3p40nJH2pvkpQmn/sKDlTwOgfjz8NU/EInBEp6S7mx3mqB8XRZoFMRZHE57rUDqXLGq VA6Q== X-Gm-Message-State: AOAM532c64hAlC5RDP5WM/Hm4QYc4zF4VhQ9S8TwKl1mj704Asd91cmo l8ISfIMGVA8MapdESbcIIsDRZMIcpQA= X-Received: by 2002:a2e:9b8c:: with SMTP id z12mr4441285lji.257.1592677012815; Sat, 20 Jun 2020 11:16:52 -0700 (PDT) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id w17sm2082335ljj.108.2020.06.20.11.16.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Jun 2020 11:16:51 -0700 (PDT) Received: by mail-lf1-f54.google.com with SMTP id c21so7371991lfb.3 for ; Sat, 20 Jun 2020 11:16:51 -0700 (PDT) X-Received: by 2002:a19:ae0f:: with SMTP id f15mr5206631lfc.142.1592677011252; Sat, 20 Jun 2020 11:16:51 -0700 (PDT) MIME-Version: 1.0 References: <20200618210645.GB2212102@localhost.localdomain> <20200620075732.GA468070@localhost.localdomain> In-Reply-To: <20200620075732.GA468070@localhost.localdomain> From: Linus Torvalds Date: Sat, 20 Jun 2020 11:16:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] linux++, this: rename "struct notifier_block *this" To: Alexey Dobriyan Cc: Linux Kernel Mailing List , Netdev , linux-arch , NetFilter Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 20, 2020 at 12:57 AM Alexey Dobriyan wrote: > > > 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. Can you explain? > > 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". My point about 'new' is that (a) there's a lot more 'new' than 'this' (b) without dealing with 'new', dealing with 'this' is pointless So why bother? Without some kind of pre-processing phase to make our C code palatable to a C++ parser, it will never work. And if you _do_ have a pre-processing phase (which might be a #define, but might also be a completely separate pass with some special tool), converting 'this' in the kernel sources isn't useful anyway, because you could just do it in the pre-processing phase instead. See? THAT is why I'm harping on 'new'. Not because you sent me a patch to deal with 'new', but because such a patch will never be accepted, and without that patch the pain from 'this' seems entirely irrelevant. What's your plan for 'new'? And why doesn't that plan then work for 'this'? Linus