Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Aug 2015 12:03:07 +0200
From:      Ed Schouten <ed@nuxi.nl>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        John-Mark Gurney <jmg@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r286170 - head/share/man/man9
Message-ID:  <CABh_MKm3cWbPu6WiP9i%2BF-6CuuAH-UAGcek8jEbN0ZxjNZ5GeA@mail.gmail.com>
In-Reply-To: <20150802145434.V1128@besplex.bde.org>
References:  <201508020022.t720MFqp023071@repo.freebsd.org> <20150802145434.V1128@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Bruce,

2015-08-02 7:35 GMT+02:00 Bruce Evans <brde@optusnet.com.au>:
> 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 <ed@nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK/VAT number: 62051717



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABh_MKm3cWbPu6WiP9i%2BF-6CuuAH-UAGcek8jEbN0ZxjNZ5GeA>