From owner-freebsd-hackers@freebsd.org Tue Sep 13 20:42:37 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24600BD9028 for ; Tue, 13 Sep 2016 20:42:37 +0000 (UTC) (envelope-from danielsh@apache.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0EEB1397 for ; Tue, 13 Sep 2016 20:42:36 +0000 (UTC) (envelope-from danielsh@apache.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1968A2093D; Tue, 13 Sep 2016 16:42:35 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Tue, 13 Sep 2016 16:42:35 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=sB8Qmp8vE98lYnP F0HMgHVo+OsA=; b=Fv67M39dxUULpPlQTYrlz3KPE7p8VdQixP6L8yQS81+VERW 0gqzgG+Ws4ZqkNs6QajKVsujWQL+wYwFs7dFFnC9UOD2xzX56jNIfzYiT+fU/GwV /q3JPt5YZx0Tx/fIbi+jC/SliouW/CIt6dYVUdNDiVkuQjc22ZBtK/7Byw0Y= X-Sasl-enc: 4x/hQxRNF8VxhPKDd7REqa2glvSItutJVZVZ/umgi5TM 1473799354 Received: from fujitsu.shahaf.local2 (bzq-109-64-145-250.red.bezeqint.net [109.64.145.250]) by mail.messagingengine.com (Postfix) with ESMTPA id B63C8F29D9; Tue, 13 Sep 2016 16:42:34 -0400 (EDT) Received: by fujitsu.shahaf.local2 (Postfix, from userid 1000) id 3sYc6J1G4bzjr; Tue, 13 Sep 2016 20:41:44 +0000 (UTC) Date: Tue, 13 Sep 2016 20:41:44 +0000 From: Daniel Shahaf To: Cedric Blancher Cc: twilight , freebsd-hackers@freebsd.org Subject: Re: What is the point in expression: !!var ? Message-ID: <20160913204144.GA13610@fujitsu.shahaf.local2> References: <7bf5cd37-6436-8cec-74e3-f0856bcc807c@openmailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Tue, 13 Sep 2016 23:43:02 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2016 20:42:37 -0000 Cedric Blancher wrote on Tue, Sep 13, 2016 at 22:10:24 +0200: > The point is to transform the value of a (any kind, like pointer) to a > Boolean value. In more words: «!!x» is equivalent to «(x ? 1 : 0)». Daniel