From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88745 invoked by alias); 18 Jul 2018 12:15:33 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 88503 invoked by uid 89); 18 Jul 2018 12:15:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=reposurgeon, polyglot, H*f:sk:P2Jb05y, raymond X-HELO: mail-io0-f193.google.com Received: from mail-io0-f193.google.com (HELO mail-io0-f193.google.com) (209.85.223.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Jul 2018 12:15:25 +0000 Received: by mail-io0-f193.google.com with SMTP id q9-v6so3874359ioj.8 for ; Wed, 18 Jul 2018 05:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b16sdT0J+xPKHCHhCeUMAphL7roK4FSGAVYmFhySQGk=; b=LbXVbO3n6pUK8k+5/D44PdlgzJBbjQ7p0dmGusAOq0xe4LfFLAMusvtu0k3xDXDoyW wOzLsllJSCz4bUiTIaAPCfyGJn2KC9Gl503xQarCEf3x/WgrEixaowzzAL8AzMZVy5jn YCCEyo8Px+7Phz/fQfhL3mmw6x/9ILEFJyLEr7kydkTfwX/u/7o5GoBY1aPy8IgKK6p9 4MovT6DabT81sr3TMPoCBmycv3sMuaBf0oj3xk2T3q6+Db1iK8w7Ob4rDEcFtdObJ99U PE1xuJ1+eKImjkxWBSrCYHy7Wkw+977jkz/5FxsSs6mtItZjJBQ3TVQVa7t+FgXd4s/S LM0g== MIME-Version: 1.0 References: <1531911391.18413.114.camel@redhat.com> <20180718120625.GA19628@thyrsus.com> In-Reply-To: <20180718120625.GA19628@thyrsus.com> From: Jonathan Wakely Date: Wed, 18 Jul 2018 12:15:00 -0000 Message-ID: Subject: Re: [RFC] Adding Python as a possible language and it's usage To: Eric Raymond Cc: David Malcolm , Richard Guenther , =?UTF-8?Q?Martin_Li=C5=A1ka?= , "gcc@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00256.txt.bz2 On Wed, 18 Jul 2018 at 13:06, Eric S. Raymond wrote: > > Jonathan Wakely : > > On Wed, 18 Jul 2018 at 11:56, David Malcolm wrote: > > > Python 2.6 onwards is broadly compatible with Python 3.*. and is about > > > to be 10 years old. (IIRC it was the system python implementation in > > > RHEL 6). > > > > It is indeed. Without some regular testing with Python 2.6 it could be > > easy to introduce code that doesn't actually work on that old version. > > I did that recently, see PR 86112. > > > > This isn't an objection to using Python (I like it, and anyway I don't > > touch the parts of GCC that you're talking about using it for). Just a > > caution that trying to restrict yourself to a portable subset isn't > > always easy for casual users of a language (also a problem with C++98 > > vs C++11 vs C++14 as I'm sure many GCC devs are aware). > > It's not very difficult to write "polyglot" Python that is indifferent > to which version it runs under. I had to solve this problem for > reposurgeon; techniques documented here... I don't see any mention of avoiding dict comprehensions (not supported until 2.7, so unusable on RHEL6/CentOS6 and SLES 11). I maintain it's easy to unwittingly use a feature (such as dict comprehensions) which works fine on your machine, but aren't supported by all versions you intend to support. Regular testing with the oldest version is needed to prevent that (which was the point I was making).