From owner-svn-src-all@FreeBSD.ORG Tue Jul 15 20:26:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F2D844C; Tue, 15 Jul 2014 20:26:28 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9AB02109; Tue, 15 Jul 2014 20:26:27 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 026C8B94F; Tue, 15 Jul 2014 16:26:25 -0400 (EDT) From: John Baldwin To: gahr@freebsd.org Subject: Re: svn commit: r268491 - head/usr.bin/users Date: Tue, 15 Jul 2014 16:25:36 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201407101215.s6ACF3v1055260@svn.freebsd.org> <201407111726.14347.jhb@freebsd.org> <20140715192149.GR1812@ptrcrt.ch> In-Reply-To: <20140715192149.GR1812@ptrcrt.ch> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201407151625.36537.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 15 Jul 2014 16:26:25 -0400 (EDT) Cc: Ed Schouten , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2014 20:26:28 -0000 On Tuesday, July 15, 2014 3:21:49 pm Pietro Cerutti wrote: > On 2014-Jul-10, 11:27, John Baldwin wrote: > > I would also prefer avoiding 'using namespace' when possible, especially > > for a short program. > > On 2014-Jul-11, 17:26, John Baldwin wrote: > > I suppose it would be fine to permit it in small utilities and only in .cc > > files but not otherwise? > > I'm confused. One is earlier in the thread and the second is later in the thread after considering more input. > There's an answer to that SO article that starts with: > > "Experienced programmers use whatever solves their problems and avoid > whatever creates new problems." > > And I really think that this is the bottom line. Like any feature, > "using" declarations can be good or bad, depending how one uses them. Different people will read that quite differently though. I can easily see people using that same statement to argue for all sorts of rules about "using namespace std" (always, never, sometimes) > Bottom line: I'd agree to a rule to avoid using directive and > declarations in header files, but please don't stigmatize "using" as an > intrinsically bad thing. I think everyone agrees on not using it in headers, and with David's suggested guidelines it seems it would be fine to use in implementation files for nearly every C++ program in FreeBSD's base system (we're not going to use boost in base utilities). -- John Baldwin