From owner-svn-src-head@freebsd.org Tue Aug 4 10:03:08 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49C6F9B3FAC for ; Tue, 4 Aug 2015 10:03:08 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com [209.85.218.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B98A27D for ; Tue, 4 Aug 2015 10:03:07 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by oihn130 with SMTP id n130so2380126oih.2 for ; Tue, 04 Aug 2015 03:03:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0AqBK0pWLT+DCpiwRNa9Iu8mHT/9ZSScMhJhTK2P6vI=; b=Fn3258x4X0CgIkTIrBQH/ZIwBjZbZiSFEJje9y+8oiRjL/xcKhFkT/EDZAuFlbK2/r 0ZIRfa6Z+OqRnvIVap2U04CwJxBXmYqdDbRAdQWZgCOr/yf0QNnpCwuYDz4fV81q96M7 Z7mk1XHmtsYvxbscBdbfSNsje0cHq8baH799ro3CZUEW1tXHkMAjQPBz/Tdg6IGu15iF VHdwtajRUxQqDjRe9iMTUNCA1V2I1UDG+TIj0WjJfFha4IS183S25B00TzPwuBQZBP6q 5g0VqLc6UaHifoeeWSja2+ag+3VCRc+LVHsI5R7IgXrvZbQiGoeJ0uRs1veo28uQB9d3 0KKA== X-Gm-Message-State: ALoCoQmdKNvjc7Kcufb6pI9OvY8tzFY7WU9GCswZQT/5xGFqJzRtBsIZ5S6dkzqRaCK/e+XDeGoz MIME-Version: 1.0 X-Received: by 10.202.171.21 with SMTP id u21mr2265487oie.113.1438682587274; Tue, 04 Aug 2015 03:03:07 -0700 (PDT) Received: by 10.76.50.84 with HTTP; Tue, 4 Aug 2015 03:03:07 -0700 (PDT) X-Originating-IP: [84.27.222.46] In-Reply-To: <20150802145434.V1128@besplex.bde.org> References: <201508020022.t720MFqp023071@repo.freebsd.org> <20150802145434.V1128@besplex.bde.org> Date: Tue, 4 Aug 2015 12:03:07 +0200 Message-ID: Subject: Re: svn commit: r286170 - head/share/man/man9 From: Ed Schouten To: Bruce Evans Cc: John-Mark Gurney , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2015 10:03:08 -0000 Hi Bruce, 2015-08-02 7:35 GMT+02:00 Bruce Evans : > This function shouldn't be deprecated. It is a kernel wrapper with a > good name for hiding the implementation detail or not-yet standard > interface _Static_assert(). _Static_assert has been part of the C standard for approximately 4 years now. I personally couldn't care less about the naming, but in a couple of years from now we'll have an entire generation of recently graduated computer scientists who know what _Static_assert does, because they used it in their C/C++ programming classes. None of them know what a 'CTASSERT' is. We constantly complain about how hard it is to attract new developers to the project. Maybe it's because we require them to learn nonsensical things in order to contribute code. > CTASSERT() is the compile-time variant of KASSERT(). We intentionally > use KASSERT() instead of anything like the standard assert(3) since > we don't like the API or semantics of assert() and want one with > different design and implementation bugs. I can't think of any use > for different semantics to _Static_assert(), but using CTASSERT() > retains flexibility. The problem with this reasoning is that it can be extrapolated. Why is _Static_assert() special in this regard? Why wouldn't we then write a wrapper around 'while' and use it all over our codebase, simply to retain flexibility? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK/VAT number: 62051717