From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 5 13:05:25 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CFF91065675 for ; Fri, 5 Dec 2008 13:05:25 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 343358FC08 for ; Fri, 5 Dec 2008 13:05:25 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=ETKsCBiF7WWirOoZ++psPCqDVpBUt3opOQnywUqHGLGwBkKjf+gPUDtKBpudSV3b3puRGIBFXdUk1qoRYV/zKbUq8AJdqB5XoJAlnQTZ2n/oJ5r6me4F7uSAIt8Ygk2aYKnkDc9/6pQjE/fATQQTQN+mjld3n4LjNFHVdZ9apkg=; Received: from amnesiac.at.no.dns ([144.206.182.38]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1L8aN1-000IAt-B8; Fri, 05 Dec 2008 16:05:23 +0300 Date: Fri, 5 Dec 2008 16:05:21 +0300 From: Eygene Ryabinkin To: Garrett Cooper Message-ID: References: <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <20081205072229.GE18652@hoeg.nl> <7d6fde3d0812050034y43a70ce8i49fbba92f9c8943b@mail.gmail.com> <7d6fde3d0812050035u6e3ea930o9e093830a8608444@mail.gmail.com> <20081205084441.GA29312@owl.midgard.homeip.net> <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/e2eDi0V/xtL+Mc8" Content-Disposition: inline In-Reply-To: <7d6fde3d0812050050l57684eebkf14f252d78b68ec0@mail.gmail.com> Sender: rea-fbsd@codelabs.ru Cc: Maksim Yevmenkin , FreeBSD Hackers Subject: Re: RFC: small syscons and kbd patch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2008 13:05:25 -0000 --/e2eDi0V/xtL+Mc8 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Garret, Fri, Dec 05, 2008 at 12:50:38AM -0800, Garrett Cooper wrote: > 1. What dialect of C was it defined in? Is it still used in the > standard dialect (honestly, this is the first time I've ever seen it > before, but then again I am a younger generation user)? It is the standard negation operator: !(expr) is equal to (expr =3D=3D 0). > 2. Is it still taught in schools (I didn't learn it when I was taught > C)? Yes. I am personally teaching the people in school and I am explaining the concept of double negation every two years ;)) > If not in schools, what about the Richie text (it's sort of like > the defacto C programming standard book of course)? K&R book is good but it at no means covers all tricks and idioms of a C language. > 3. What's the real loss of going to `? :', beyond maybe 3 extra > keystrokes if it's easier for folks who may not be as experienced to > read? No real loss, just easier to type and looks more compact. It is the matter of a personal taste, I think. If one knows this idiom, he will recognize it at a glance. If not, one should think a bit about the logics behind it, but it shouldn't be hard: almost everyone uses constructs like 'if (!ptr)'. And there is only one step from there to the double negation. --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --/e2eDi0V/xtL+Mc8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkk5JxEACgkQthUKNsbL7YguFACgitCINYMboc3XROsVpHiqZXJS lGoAn1wsMu62iIqyfyBJ1GbtFln1sISV =mxfg -----END PGP SIGNATURE----- --/e2eDi0V/xtL+Mc8--