Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 9 Apr 2002 21:52:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 9 Apr 2002 21:52:38 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:20489 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Tue, 9 Apr 2002 21:52:37 -0400 To: linux-kernel@vger.kernel.org From: "H. Peter Anvin" Subject: Re: C++ and the kernel Date: 9 Apr 2002 18:52:19 -0700 Organization: Transmeta Corporation, Santa Clara CA Message-ID: In-Reply-To: <20020409122622.GN612@gallifrey> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Disclaimer: Not speaking for Transmeta in any way, shape, or form. Copyright: Copyright 2002 H. Peter Anvin - All Rights Reserved Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Followup to: By author: "Richard B. Johnson" In newsgroup: linux.dev.kernel > > > > Bollox! > > > > There are many places in the kernel that are actually very OO - look at > > filesystems for example. The super_operations sturcture is in effect a > > virtual function table. > > The file operations structure(s) are structures. They are not object- > oriented in any way, and they are certainly not virtual. The code that > manipulates them is quite physical and procedural, well defined, and > visible to the rest of the kernel. > Again, bollocks. The file operation structures are vanilla vtbl implementations of virtual functions. The fact that they're written foo->f_ops->func(foo, ...); instead of foo->func(...); makes absolutely no difference whatsoever. -hpa -- at work, in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/