From owner-svn-src-all@freebsd.org Tue Aug 4 10:03:08 2015 Return-Path: Delivered-To: svn-src-all@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 48D2F9B3FAB for ; Tue, 4 Aug 2015 10:03:08 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-oi0-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) (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 1A73A27C for ; Tue, 4 Aug 2015 10:03:07 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by oip136 with SMTP id 136so49326oip.1 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=aJzrVO65JJaVW1VQav9z8ZGMHXaWAcRf4tl0qIwj3rPK0SepF0YIbFwFZlYGRDykVI Hmvm8Mqf95CpPv59rfNQNVprVZ8CVsGX+1giF7SYOv8V81M5hGpCZtrMkR49COvUhAbL jjbCrW9COnuSWL6IYpvi1XYisr7dykkC6WEJueeIbEh2nl8zFVRGN3WgY19B8yJqHvcX xc5Ztc0QxlZNZZqRTxM1o87XgvitCD0/roVZ1RzfO7KKq1c0l2ka2WremWEeg2gt49N7 q0CTcSFozm0qxumkeGLGjCN99nMjgL59dQZ5Ua+Khzu2730oi1ifGbqv5s1q/IINIZ6G GTlQ== X-Gm-Message-State: ALoCoQk0R+0M5E5oWz8hbYrMIq8F8CSvMh/b4HYK2SbaZiaxOwkWRwRXxBEJWkyNqHyeYBRxe4uw 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-all@freebsd.org X-Mailman-Version: 2.1.20 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, 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