Coding Styles and OpenSolaris
By wyllys on May 12, 2005
OpenSolaris is coming! The world will get to see, warts and all, the gory details of how and why Solaris works the way it does. I'm not actively involved in any sort of decision making on how OpenSolaris will work or how code contributions from outside of Sun will be reviewed. I do know how things work from the inside, though. In addition to the obvious requirements that new code doesn't break old code, interfaces stability rules must be maintained, and architectural integrity must be respected, there are other "rules" that we (inside Sun) must follow. Among these are our "cstyle" rules - rules that govern how the code must appear (braces and indentation rules, for example).
This sort of thing (enforcement of style rules) has been known to spark religious wars in some companies that I worked at prior to Sun and is always a contentious subject when 2 people with different style preferences try to merge their code.
I read an interesting article yesterday on Joel On Software about coding standards and how code styling standards can be misused (as well as how and why they are indeed useful). Mostly the article is about Windows programming and there is considerable discussion on Hungarian notation and the use of exception handlers in Java and C++. It is all sort of interesting and timely (at least for me) because I've been wondering how the external community will view our code from a readability and "stylistic" point of view. I guess we'll find out soon enough...