From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5578 invoked by alias); 14 Oct 2009 19:29:19 -0000 Received: (qmail 5569 invoked by uid 22791); 14 Oct 2009 19:29:19 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Oct 2009 19:29:12 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9EJTAMf006685 for ; Wed, 14 Oct 2009 15:29:10 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9EJTAw1028588; Wed, 14 Oct 2009 15:29:10 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n9EJT84U015424; Wed, 14 Oct 2009 15:29:09 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 948CF37828F; Wed, 14 Oct 2009 13:29:08 -0600 (MDT) From: Tom Tromey To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Add method overload resolution to expression parser References: <4A9D628B.1070300@redhat.com> <20091013212426.GA26169@caradoc.them.org> <20091014191710.GA1785@caradoc.them.org> Reply-To: Tom Tromey Date: Wed, 14 Oct 2009 19:29:00 -0000 In-Reply-To: <20091014191710.GA1785@caradoc.them.org> (Daniel Jacobowitz's message of "Wed, 14 Oct 2009 15:17:10 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00314.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Daniel> Maybe we need to get that merged, then, instead of complicated Daniel> lifetime-confusing hacks around it :-) Yeah, this would help in several scenarios. E.g., it would let us memoize Python Type objects. However, in this case, if we made a new type, I think we would still need a new expression operator. My reasoning is that we are selecting an overload at expression evaluation time, so we are using the type in a fundamentally different way from a cast operator. I don't think I understand why we do this overload selection at evaluation time and not during the parse. (It is often preferable to defer operations until evaluation time so that we can apply them to a convenience variable's possibly-mutable type -- but that does not apply in this instance.) Tom