From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13300 invoked by alias); 7 Mar 2003 20:40:52 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 13205 invoked from network); 7 Mar 2003 20:40:49 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by 172.16.49.205 with SMTP; 7 Mar 2003 20:40:49 -0000 Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out1.apple.com (8.12.7/8.12.7) with ESMTP id h27KenYv022076 for ; Fri, 7 Mar 2003 12:40:49 -0800 (PST) Received: from scv1.apple.com (scv1.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Fri, 7 Mar 2003 12:40:44 -0800 Received: from bothner.com (il0102b-dhcp93.apple.com [17.201.26.143]) by scv1.apple.com (8.11.3/8.11.3) with ESMTP id h27Kels21292; Fri, 7 Mar 2003 12:40:47 -0800 (PST) Message-ID: <3E68FDB0.6030801@bothner.com> Date: Fri, 07 Mar 2003 20:49:00 -0000 From: Per Bothner User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Neil Booth CC: GCC Hackers Subject: Re: Putting C++ code into gcc front end References: <3E64C09A.9070500@comsys.se> <87isuzjb71.fsf@fleche.redhat.com> <3E67FBA6.1000907@bothner.com> <20030307125056.GA23848@gauvain.u-strasbg.fr> <20030307202316.GD31657@daikokuya.co.uk> In-Reply-To: <20030307202316.GD31657@daikokuya.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00528.txt.bz2 Neil Booth wrote: > Really, why does everything have to be shoehorned into being a tree? > Decls, expressions, scopes / symbol tables, statements etc should > all be their own data type. We can get perfectly good type checking > in C if we don't insist the universe is made up of trees. I agree. However, inheritance is still useful. For example one might have different classes for different kinds of declarations, different kinds of expressions, etc. Perhaps not that big a benefit. Even more valuable: C++ constructors, destructors, and assignment operators might have reduced the need for garbage collection. -- --Per Bothner per@bothner.com http://www.bothner.com/per/