svn commit: r286170 - head/share/man/man9

Ed Schouten ed at nuxi.nl
Tue Aug 4 10:03:08 UTC 2015


Hi Bruce,

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


More information about the svn-src-head mailing list