From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78656 invoked by alias); 24 Jul 2017 10:56:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 65918 invoked by uid 89); 24 Jul 2017 10:56:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Jul 2017 10:56:28 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id v6OAuLYt025135; Mon, 24 Jul 2017 05:56:21 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id v6OAuKCk025129; Mon, 24 Jul 2017 05:56:20 -0500 Date: Mon, 24 Jul 2017 10:56:00 -0000 From: Segher Boessenkool To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Re: [00/77] Add wrapper classes for machine_modes Message-ID: <20170724105620.GX13471@gate.crashing.org> References: <8760ewohsv.fsf@linaro.org> <20170722210245.GP13471@gate.crashing.org> <87r2x6rxp5.fsf@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r2x6rxp5.fsf@linaro.org> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg01413.txt.bz2 On Mon, Jul 24, 2017 at 10:28:06AM +0100, Richard Sandiford wrote: > > So what does it change in the interfaces we use? I couldn't find an > > update of documentation, maybe I missed it (it's a huge series :-) ) > > An overview of the new interfaces (and how they are used) would help. > > You didn't miss one. I was hoping the function comments would be enough, > but on reflection, they're not. I've attached a patch for rtl.texi below. Thanks! > > From what I can tell so far it makes things much harder to read. > > Perhaps that is just because this is all new. > > Which parts specifically? E.g. is it mostly the is_a (x, &y) changes? > Or the as_a (x) changes too? Do you think the FOR_EACH_* iterators > also make things harder to read? Or is machine_mode->scalar_int_mode > itself a problem? All the as_a (x) etc. looks like cuneiform to me (not just in your patch); and I cannot read cuneiform :-) One day I might understand why we need all this C++ inverted syntax, needless abstraction, needless generalisation, data hiding and everything else hiding. Until then, I rant. Sorry. The main purpose of abstraction is to make code easier to understand and to write and change, but with C++ it usually makes it harder it seems :-( Segher