From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9222: 23.3.50; "void" is not "typeless" (but thanks for the koan!) Date: Mon, 12 Sep 2011 08:39:10 -0400 Message-ID: References: <87sjpkc5zm.fsf@sc3d.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1315831211 19454 80.91.229.12 (12 Sep 2011 12:40:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Sep 2011 12:40:11 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , 9222@debbugs.gnu.org To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 12 14:40:06 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R35nw-0000TP-0u for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Sep 2011 14:40:04 +0200 Original-Received: from localhost ([::1]:54483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R35ns-0003Jr-C5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Sep 2011 08:40:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R35no-0003H0-Oq for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 08:39:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R35nn-0002J1-V4 for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 08:39:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R35nn-0002Iw-TX for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 08:39:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R35rl-0004KK-Ok; Mon, 12 Sep 2011 08:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2011 12:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9222 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9222-submit@debbugs.gnu.org id=B9222.131583141616592 (code B ref 9222); Mon, 12 Sep 2011 12:44:01 +0000 Original-Received: (at 9222) by debbugs.gnu.org; 12 Sep 2011 12:43:36 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R35rL-0004JZ-Dj for submit@debbugs.gnu.org; Mon, 12 Sep 2011 08:43:35 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R35rJ-0004JQ-Cq for 9222@debbugs.gnu.org; Mon, 12 Sep 2011 08:43:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABr8bU5FxK3+/2dsb2JhbABBhFWjMHmBUgEBBAEjBC8jBQsLDgwCGA4CAhQYDSSICqVKkH+BLIQxgREEoDKEQw X-IronPort-AV: E=Sophos;i="4.68,368,1312171200"; d="scan'208";a="135831601" Original-Received: from 69-196-173-254.dsl.teksavvy.com (HELO ceviche.home) ([69.196.173.254]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 12 Sep 2011 08:39:11 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id A7508660B6; Mon, 12 Sep 2011 08:39:10 -0400 (EDT) In-Reply-To: (Reuben Thomas's message of "Sun, 11 Sep 2011 09:13:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 12 Sep 2011 08:44:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51062 Archived-At: >> It's still not typeless: it's just that the type you get gives you no >> information about the data. > Moreover, in C, in which types are not first-class objects, no type > has a type, so every type is a typeless type. Actually, you don't need types to be "first class objects" for them to have a type. From type theory's point of view, C types all have the same type, which you could call "Type" or * or =CF=89, i.e. the type of types. It's also often called a kind. To be more precise, in C you could consider "struct" as a type-level function which takes a descriptor and returns a type. And "{ int a,b; char c; }" would then be a structure-descriptor. I.e.: struct has type "StructureDescriptor -> Type" { int a,b; char c; } has type "StructureDescriptor" >From that point of view "struct" is a valid expression in the type language, but it does not describe a set of values: only types who have type "Type" describe values. > I agree, BTW, that "unit type" is a better description of void than my > original "empty type". >From a theoretical point of view, yes, but most people are unfamiliar with "unit type" and its name doesn't lend itself to a good intuitive understanding of it. Stefan