From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id C8b7L6/pAmFSSQAAWB0awg (envelope-from ) for ; Thu, 29 Jul 2021 13:47:27 -0400 Received: by simark.ca (Postfix, from userid 112) id B2CAD1EDFB; Thu, 29 Jul 2021 13:47:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,RDNS_DYNAMIC,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 02EAA1E813 for ; Thu, 29 Jul 2021 13:47:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B151D3AA8CAE for ; Thu, 29 Jul 2021 17:47:26 +0000 (GMT) Received: from gateway33.websitewelcome.com (gateway33.websitewelcome.com [192.185.145.87]) by sourceware.org (Postfix) with ESMTPS id 2DDB3385E838 for ; Thu, 29 Jul 2021 17:47:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2DDB3385E838 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tromey.com Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 9ADC8D6665 for ; Thu, 29 Jul 2021 12:47:11 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 9A7jmrGivK61i9A7jmzp2O; Thu, 29 Jul 2021 12:47:11 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=h16oQq8M+q5lkCFt7WqMrZ3LQFPkVqDmpGX7qC6pCEc=; b=ElPwHpeW1v4VzWKejEcTfr7tl6 NwNeAjpZW8GWk8sykk22YwHsx3djkLr0IoYgshSs/hzFS+wsuHUsbIfx3nrYF1hrCfCBa5LexJdxY SpD8g2CojU1z9bMBx1+7mSRIf; Received: from 97-122-74-117.hlrn.qwest.net ([97.122.74.117]:44474 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m9A7j-001Abw-EJ; Thu, 29 Jul 2021 11:47:11 -0600 From: Tom Tromey To: Lancelot SIX Subject: Re: [PATCH 15/16] gdb: make cmd_list_element var an optional union References: <20210714045520.1623120-1-simon.marchi@polymtl.ca> <20210714045520.1623120-16-simon.marchi@polymtl.ca> <20210714120851.3pfew5pgcdp6ezn6@ubuntu.lan> <20210714171238.vzccwpurh2izbkps@ubuntu.lan> <20210714232112.wsn7pits6uuz3nf5@ubuntu.lan> <20210720230335.dcpfxbol2uwjre3b@Plymouth> <87sfzyci3i.fsf@tromey.com> <20210728204538.z3iqkcfp7yenehms@ubuntu.lan> X-Attribution: Tom Date: Thu, 29 Jul 2021 11:47:10 -0600 In-Reply-To: <20210728204538.z3iqkcfp7yenehms@ubuntu.lan> (Lancelot SIX's message of "Wed, 28 Jul 2021 20:45:38 +0000") Message-ID: <87eebhau75.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.74.117 X-Source-L: No X-Exim-ID: 1m9A7j-001Abw-EJ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-74-117.hlrn.qwest.net (murgatroyd) [97.122.74.117]:44474 X-Source-Auth: tom+tromey.com X-Email-Count: 18 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Tromey , Lancelot SIX via Gdb-patches Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" >>>>> "Lancelot" =3D=3D Lancelot SIX writes: Lancelot> Would you prefer to have something like var.get () re= turn a Lancelot> string happily if var is lets say a var_filename but fail if it i= s a Lancelot> var_boolean? Yeah. Lancelot> I=C2=A0guess it is possible, but I did intentionally went for a v= ery explicit Lancelot> approach. The idea is to have the user of the class state that h= e is Lancelot> aware he will access a data of a given type that can be interpret= ed in Lancelot> different ways. This kind of makes more sense when dealing with = the Lancelot> various var_*integer* types where the same value can have differe= nt Lancelot> meaning depending on the effective var_type. I don't understand how to reconcile this with the idea that one could pass in a bunch of var_ parameters and get some result back. Like does get work? I guess the argument would be that the author of that line is supposed to understand what's happening and that the meaning of the value might "vary"? For me that seems to add a bunch of extra template code but without any real gain in safety. Tom