220 37306 <CANiq72=fF3=NRpKjGSF_BEu4sfDKxU_1kDe9e-=VTx=BZ6H=CA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: More compact #include statement.
Date: Sun, 11 Mar 2018 19:41:03 +0100
Lines: 82
Approved: news@gmane.org
Message-ID: <CANiq72=fF3=NRpKjGSF_BEu4sfDKxU_1kDe9e-=VTx=BZ6H=CA@mail.gmail.com>
References: <bcdae121-4ec3-4547-9ee9-7668cc7e8e59@isocpp.org>
 <32ae2dd9-e59e-4c91-bdb2-308ede3f731a@isocpp.org> <p838m8$cae$1@blaine.gmane.org>
 <3de2a91c-7917-457a-bfc6-7f79e2b487dd@isocpp.org> <CAFQaeCC159LTJbbRsXqYeuGpTgS8kxfW1nZMZ97J5yLveqgumw@mail.gmail.com>
 <p83nu3$ifd$1@blaine.gmane.org> <fac8564e-5840-4c74-b645-18ad6cd14688@isocpp.org>
 <p83pqc$9fi$1@blaine.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1520793563 17010 195.159.176.226 (11 Mar 2018 18:39:23 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 11 Mar 2018 18:39:23 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDRZHGH43YJRBVHQSXKQKGQEDBGJPHY@isocpp.org Sun Mar 11 19:39:19 2018
Return-path: <std-proposals+bncBDRZHGH43YJRBVHQSXKQKGQEDBGJPHY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qt0-f198.google.com ([209.85.216.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDRZHGH43YJRBVHQSXKQKGQEDBGJPHY@isocpp.org>)
	id 1ev5sM-0004K6-JW
	for gclcip-std-proposals@m.gmane.org; Sun, 11 Mar 2018 19:39:18 +0100
Original-Received: by mail-qt0-f198.google.com with SMTP id p11sf11098569qtg.19
        for <gclcip-std-proposals@m.gmane.org>; Sun, 11 Mar 2018 11:41:25 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1520793685; cv=pass;
        d=google.com; s=arc-20160816;
        b=iOigUxOuJBsh8AvcoKQGtQY4IqOKNJPUAUS43gJAnZomqG53gb9RrNLHHh7ollSyKK
         1KRzsF4RU6YwvIythr1LogWLhC9nFTXwYpG+HN+ZEddMdsJ4qLz2K+ZYUL9q5kjHABo8
         5MlBHk1J9jFvV9d0OCmrrhpAL6SzCTpwGq2B9PZPaGdMlv5Ide4Up3+XH8rF3Z7yQ7pl
         QW6SOPUTORguyfR+XUvrqd93MYTRMCxdcd8e7waBijigQdbrcoWorXN0k8qdn7C5UTcF
         lkba+CrjDlbdwDCkD06QJPjl5ZM69FWn7ruRyQsrND9Vig9FRufCzYchYUIWlcCc8aUm
         yAzg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=gm1xwjBMYdSqoqZkc2OOxUaZD/9JKi57iyoaZazg0NE=;
        b=JnoOzIwBh0jIJYF1oFboNSP9l15TgtvqfL3YTeX3BGxICVGWvAsEZi3YPaIUqTS1bh
         5ibr6xD+N55iTRQSFdYJsr/TWEesWJ+BQh+vqYdfT4cj/Dc6gFyKogUrLAZAhZ9PW2xo
         +GbeSxMt0MNKhiD3DflMUv9wcLFc/+bpu5FzQ0koZOO1PSFbGGm8kKNLApY0FIbc8OHO
         +SCmD6uEnlpc2KHGGx7YiMpBdLnCCWgeBdAxFAv08scs+0wtnELv3rdH15ogyZfhj+R5
         p18Wb1/zOMtPvgLCDliHZXx1wFzZXvV6Eb4EC/SRmGVwg+fYhJKusnEEPlYJ+h7q0GUf
         XeZg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=LDKS0Y6z;
       spf=pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=gm1xwjBMYdSqoqZkc2OOxUaZD/9JKi57iyoaZazg0NE=;
        b=TvPJ2WthQEbBYblmos5r4vcdv5xHSU0cr1rnLkWa3sd/YRChQjXDLmi9Hb9LjJ4hu2
         6S0Ub2kAO4RqRFJOmgFuyQaYrHHCIaY5j8m0xDBtOc5SbeXZVtfxOMWgqxHaiNgh0f2V
         /zpHFLIstTLvMijE6G4fLSVIYuHfy/GPYjkqDueXTXm7a4B9nmWODHCDL2yWcNgguaDq
         2WkNKM5GWSx2iXujV2rLBkI0kO6W3OuHsNnbnmvVDvO0q4SnelXLEBpLN2WgxZtyq4yi
         K0WANNIAz7jNWPZY+Pj2iJ9dw9dJXTgYqHWcnCWHzQc7b2jFldwwXO+nUYm4EkEUACac
         WiLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=gm1xwjBMYdSqoqZkc2OOxUaZD/9JKi57iyoaZazg0NE=;
        b=UrUbOdtEvd1zUIW5FCW6I/i+Voi8JSzCzbqfFM9+gvHo0s56SusEjS8Hq9ALdkUboY
         3xtkjV7KHznU4PlKR74vNqUkU7VGyo6nE9KcVFGNqxRsddrtiGCo/m3RRB/OeiD0Hxwa
         S0Ze0RYzbN0QoQLtTElDxWlqZXcduh9EE8YgBiSlhjmvpmHyWXQNoEWcxWSqdNmznNdI
         ltvOLcBpc/I9WoJ+/2i+yFMqUI2aF3QW5WF/tOvh6tE6Vfje08mB+xBJ/r9jr0o6+brB
         AS4HuZgZEO7tcLiE+JDn5JSOPEkbXljOyPcliX8rK6nI+jcL56g0z5arXyJ8+W5Y2PUX
         lhNw==
X-Gm-Message-State: AElRT7F1BtUxMSQsGHiMxs4juFC16N+6Ou/et7KqQLLPCHWsSc2asZdS
	qz6ns++v3gB8HQikRlpEKGEJ7A==
X-Google-Smtp-Source: AG47ELubBC2r+MvUphRCpSohPiGL0pLQbOKF7LYL5YD4Fl+Sz2BPXgO4pyODJLQkQ3i0CH1RK2iK4A==
X-Received: by 10.237.40.7 with SMTP id r7mr4066514qtd.38.1520793685354;
        Sun, 11 Mar 2018 11:41:25 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.200.83.2 with SMTP id t2ls1487120qtn.1.gmail; Sun, 11 Mar 2018
 11:41:24 -0700 (PDT)
X-Received: by 10.200.49.226 with SMTP id i31mr4228187qte.304.1520793684576;
        Sun, 11 Mar 2018 11:41:24 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1520793684; cv=none;
        d=google.com; s=arc-20160816;
        b=QlB7i8jhLnEbdMMbCYU3X29S/WAp3fpeyOd6WWtwyK9RBFI6Q7qTAtmnOFcA35KtkJ
         nx8DxyS8rq/shWPr/dSQacKeJTNbC1y1wCi2woUaK9MYaQUgKZDrGZJElF0hTMD6cDui
         SzRguQ6nGd+//Mcm2Xx+ZdQQb576HDvQlyktH4oxe+9MO+1jFomRpflRXTGk1e592GW3
         kj9PIBHvY0yNJu5OGFP/UukZBHQgf0EGB9g1HGKDmEhfG9T4v0SbTVRJwctAb+0NO6Ww
         B1wgqaEDYrybbugJs71gAFWkH/mLVh3yue78Y3YvivIt0sKPD1m6AEVwOUUDIItPb9lF
         Kxvw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=a86rrfSDUSH4t2yYeb3n1FSYuOIZXDTRsS1PqQstReQ=;
        b=laQ+EyzKpok5Boi1TqUpE6VjZlli7nbxK7V91oITBBUpiNugtqtpN4Bs6kiR6DKDzo
         k7CvtNfInbz8M+MQ1wS+rtdqTfSrq+TAJXt/tLe2z5mXW9QfQ/rtUTSFVdTg/p/A11j2
         TDvWvpH/vMZe44VKDkTYDWWWyUuWpXcgD8vRNIgNIH+1H2+ip5u5OkKzwUmm92+Ep4MA
         ztW/YVbhs9c+uHotdmzJXeef2Ylfquh6IsyICsuX3EVCqIQ/7ynEIYiwZCPBSI0dxHaU
         hR20XRV0LGIJn0RYgLngWlfw2TPdR6p0Z1x6pKNZKn+ekWpKGpQioSX9/R46C3v612v2
         Rpdg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=LDKS0Y6z;
       spf=pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65])
        by mx.google.com with SMTPS id u19sor3527514qke.31.2018.03.11.11.41.24
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sun, 11 Mar 2018 11:41:24 -0700 (PDT)
Received-SPF: pass (google.com: domain of miguel.ojeda.sandonis@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65;
X-Received: by 10.233.237.2 with SMTP id c2mr7769751qkg.54.1520793684052; Sun,
 11 Mar 2018 11:41:24 -0700 (PDT)
Original-Received: by 10.200.52.247 with HTTP; Sun, 11 Mar 2018 11:41:03 -0700 (PDT)
In-Reply-To: <p83pqc$9fi$1@blaine.gmane.org>
X-Original-Sender: miguel.ojeda.sandonis@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=LDKS0Y6z;       spf=pass
 (google.com: domain of miguel.ojeda.sandonis@gmail.com designates
 209.85.220.65 as permitted sender) smtp.mailfrom=miguel.ojeda.sandonis@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:37306
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37306>

On Sun, Mar 11, 2018 at 7:47 PM, Larry Evans <cppljevans@suddenlink.net> wrote:
> On 03/11/2018 12:20 PM, Todd Fleming wrote:
>>
>> On Sunday, March 11, 2018 at 1:12:48 PM UTC-4, Larry Evans wrote:
>>>
>>>
>>> OK, to be more explicit:
>>>
>>> There's no *semantic* difference between:
>>>
>>>     import os
>>>     import sys
>>>
>>> and:
>>>
>>>     import os,sys
>>>
>>>
>> Python has a very unique culture, one that values DRY more than any
>> community I'm aware of. Yet the Python community, the high priests of DRY,
>> don't buy your argument.
>>
>
> You're misunderstanding my viewpoint.  My OP said:
>
>   To me, although it violates DRY, the `one XXX per line` guide
>   clarifies code.
>
> Thus I was *advocating* the "one XXX per line":
>
>   import os
>   import sys
>
> I mentioned the DRY principle *solely* to provide a possible
> justification for the "multiple XXX per line":
>
>   import os,sys
>
> method.  Personally, I find the "multiple XXX per line":
>
>   SomeType a_scalar, *a_ptr, a_vec[5];

I typically only find that style useful in the init statement of for
loops to declare a logically constant end variable in a for loop,
whenever one has to be sure it is not re-evaluated every iteration,
i.e:

    for (int i = 0, iEnd = get_size(); i < iEnd; ++i) { ... }

And even in that case, if it is anything non-trivial, I usually prefer
to just keep it in the previous line as a proper const variable. So
the only real benefit of the style is the lifetime reduction/scope
pollution for trivial cases.

For normal variable declarations, having only per line not only
improves readability (specially for complex types, i.e. C++), but also
allows you to have straightforward patches/diffs, i.e.:

    @@ -1,5 +1,6 @@
    #include <iostream>
    #include <map>
    +#include <sstream>
    #include <string>
    #include <vector>

vs.

    @@ -1,2 +1,2 @@
    -#include <iostream> <map> <string> <vector>
    +#include <iostream> <map> <sstream> <string> <vector>

Same applies for C/C++ #includes and Python imports.

Cheers,
Miguel

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANiq72%3DfF3%3DNRpKjGSF_BEu4sfDKxU_1kDe9e-%3DVTx%3DBZ6H%3DCA%40mail.gmail.com.

.
