From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129373 invoked by alias); 30 Nov 2016 20:40:13 -0000 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 Received: (qmail 129268 invoked by uid 89); 30 Nov 2016 20:40:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=Hx-languages-length:792 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Nov 2016 20:40:07 +0000 Received: by simark.ca (Postfix, from userid 33) id 82C7D1E18F; Wed, 30 Nov 2016 15:40:05 -0500 (EST) To: Pedro Alves Subject: Re: [PATCH 16/22] Class-ify ui_out_level X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 30 Nov 2016 20:40:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <5a48d12d-c6ab-1c31-53ce-80a85602362b@redhat.com> References: <20161124152428.24725-1-simon.marchi@polymtl.ca> <20161124152710.25007-16-simon.marchi@polymtl.ca> <82c06e7795f785cdff3090bb38880a2b@polymtl.ca> <5a48d12d-c6ab-1c31-53ce-80a85602362b@redhat.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.2 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg01019.txt.bz2 On 2016-11-30 07:06, Pedro Alves wrote: > On 11/26/2016 04:22 PM, Simon Marchi wrote: >> I had a discussion about this with Antoine. Is it a good practice to >> use explicit all the time, and only omit it when there's a good reason >> why? > > Yes, I believe so. > > Let's turn the question around: why _would_ you want to support > implicit conversion from ui_out_type to ui_out_level? > E.g, would this code make any sense? > > ui_out_level level = ui_out_type_list; > if (level == ui_out_type_tuple) > > I'd leave implicit conversions for when you're actually trying > to code a converting constructor. Ok that was my first thought as well, only omit explicit when it's a conscious decision to do so. I'll go back and re-add it to my patches :).