From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <63eb016ed1ac0ade586c2544d55e774a@proxima.alt.za> To: 9fans@9fans.net Date: Sat, 30 May 2015 08:36:52 +0200 From: lucio@proxima.alt.za In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Ports tree for Plan 9 Topicbox-Message-UUID: 568c7606-ead9-11e9-9d60-3106f5b1d025 >> It is the Plan 9 Way (TM) to avoid > nested inclusion of header files, > > $ arch/dat.h includes port/portdat.h in kernel. Exempted too? That's out of necessity, the alternative(s) would be considerably less practical. If memory serves, port/portdat.h is not strictly a header file in the connventional "C" sense. If memory serves, it would also be possible to arrange the 9 kernel sources in a more elegant manner, but the cost to benefit ratio would be too low to bother. Note that no one has ever prohibited nesting includes where it could have been possible to do it in the compiler and pre=processor. It is not a crime, it is a bad practice. I'm of the opinion that it is as avoidable as the GOTO command in programming languages (I don't use GOTOs and don't really cope well reading code that does), but there is enough code out there to suggest my opinion needs a formal proof. So, yes, I think there are exceptions and the one you quote is not the only one, mostly for historical reasons; it is also my belief that such exceptions could be eliminated, but with the advancing of time, it becomes less and less practical to do so. Further, I mentioned exemption for APE because it is an uncomfortable reality we don't need to encourage: like the kernel stuff that dates back to the 1980s, once adopted, it becomes very hard to eliminate. Lucio.