C99: Suggestions for style(9)

Stanislav Sedov stas at FreeBSD.org
Sun May 17 10:22:11 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 01 May 2009 08:12:29 -0600 (MDT)
"M. Warner Losh" <imp at bsdimp.com> mentioned:

> 
> This is a religious point, and we're dangerously close to saying my
> religion is better than your religion.  I don't like this part of the
> proposal at all.  I can see the value in relaxing it for when you have
> a series of variables that are initialized, but relaxing it to the
> point where you intermix code and declarations goes way too far.  It
> is bad enough to have to deal with inner scopes, but tolerable.  It is
> intolerable to have to look for it anywhere in a big function.  It
> tends to encourage spaghetti code, which is one of the things that
> style(9) tries to discourage in many subtle ways.
> 

Seconded. Furthermore, when declaring the every advanced editor supports
jumping to variables declarations, Christoph ignored the point that
the code gets written for people and not for compilers and editors. Last
ones can live without any style at all, people can't. The thing people
love about BSD code is that it is always perfectly known where to look
for declarations and specific parts of the code. Strict style implies
a lot of implicit knowledge, so you don't have to study a piece of code
for a long time before you understand how it works in general. By relaxing
style(9) we're in danger of loosing this benefit.

- -- 
Stanislav Sedov
ST4096-RIPE
-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAkoP5WwACgkQK/VZk+smlYFocACfTzVHRpQb8H3tAeg97ljqn3bv
DZ4An2iOQXXjTNWpivyHrGR3sBaeOfmJ
=qz0I
-----END PGP SIGNATURE-----

!DSPAM:4a0fe550994292383363236!




More information about the freebsd-hackers mailing list