From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5bca3f47d74c9c15d4259bdaad636e3f@terzarima.net> From: Charles Forsyth Date: Wed, 2 May 2007 09:44:30 +0100 To: 9fans@cse.psu.edu Subject: Re: [9fans] speaking of kenc In-Reply-To: <20070502010420.H27427@mrwint.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 55dd8e4a-ead2-11e9-9d60-3106f5b1d025 > Inherently no worse than 'if (!ptr)' or 'if (ptr && ptr->field)'. to tug this back to plan 9, and to encourage new code to resemble old: typically plan 9 code would have if(ptr == nil) if(ptr != nil && ptr->field) [depending on what `field' was, there might even be a != 0]. we're far too stupid for clever tricks like !!x. we'd probably just write tf = (x != 0); assuming that's the correct translation (it's pre-espresso here), but it is hardly ever needed anyway. !! was probably introduced by people determined to show their perfect grasp of the language (if not the science). in fact, in the linux kernel !! seems to be used as an operator much less than it is used in excited comments and exciting messages for the console. DBG_PRINT(ERR_DBG,"%s:Dont know, can't say!!\n" to my surprise there are several instances of that in the plan 9 kernel!! but fortunately none of them is serious, and all were added later!!!