From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#9222: 23.3.50; "void" is not "typeless" (but thanks for the koan!) Date: Mon, 14 Oct 2019 18:08:38 +0200 Message-ID: References: <87sjpkc5zm.fsf@sc3d.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="227250"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Lars Magne Ingebrigtsen , 9222@debbugs.gnu.org, Reuben Thomas To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 14 19:15:58 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iK3wq-000wxz-6C for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Oct 2019 19:15:56 +0200 Original-Received: from localhost ([::1]:54232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK3wo-0002u6-FE for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Oct 2019 13:15:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38209) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK2u7-0001ag-SX for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 12:09:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iK2u6-0001kc-L2 for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 12:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60983) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iK2u6-0001kW-Ho for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 12:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iK2u6-0001IA-A9 for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 12:09:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87sjpkc5zm.fsf@sc3d.org> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Oct 2019 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9222 X-GNU-PR-Package: emacs Original-Received: via spool by 9222-submit@debbugs.gnu.org id=B9222.15710693384953 (code B ref 9222); Mon, 14 Oct 2019 16:09:02 +0000 Original-Received: (at 9222) by debbugs.gnu.org; 14 Oct 2019 16:08:58 +0000 Original-Received: from localhost ([127.0.0.1]:41571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK2u2-0001Hp-3C for submit@debbugs.gnu.org; Mon, 14 Oct 2019 12:08:58 -0400 Original-Received: from mail-pf1-f196.google.com ([209.85.210.196]:35596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK2u0-0001Hc-D8 for 9222@debbugs.gnu.org; Mon, 14 Oct 2019 12:08:56 -0400 Original-Received: by mail-pf1-f196.google.com with SMTP id 205so10671348pfw.2 for <9222@debbugs.gnu.org>; Mon, 14 Oct 2019 09:08:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=UDkf7G0O0hoBvEzspz3VSgTAsqUjC0V9c2EC/y4a/gM=; b=eC9jZgRhiPObJ7bpMuw7UQKjs8tWXKlAFPnQMwnrsQ+s/+zq1h9X/jUBdZCIVm/Uyg xxSlLq8y4PkBs8qgQFDHebpB/flpFvgvHZyT5J/I2z4ZIby3opUm0al3qSfBbYpgAVxd +s7VmV/Ebc1sAmOBvEO3XsErBhwcLC7PymTLDLCf/uNGFialXZR1ay9pcTb7sxpsQe8e 2WhJm3+VBPaSWtRK+vnFbY7DwI6HCH+L2TVBrsRgaGwpFdkgd6G9IvPeN6tDaagel2mi HMpYNaAzGm3JQqUFm7PUtP2iihQ/ekOYg+wyPUA5usTHuHAhZp4MBkBdhZ8JsWWGQORx iZBQ== X-Gm-Message-State: APjAAAUgjnUNO6L1/JYBDxZTbWxvuo5JDPdIqXYFeOO/jAlU6u8AHMDq DHO+bEiJk59YstcXOGKZu9bG1CdDd5AFdpDlomA= X-Google-Smtp-Source: APXvYqzKM6+rOAxn5eajxHgt5Hnus7zaCKEfeKGIkszjgqqyViTtWXFKu7tFBZ6zKRiucv3LkFQEcnhmdAUAW5vuidA= X-Received: by 2002:a17:90a:fb92:: with SMTP id cp18mr37977809pjb.2.1571069329461; Mon, 14 Oct 2019 09:08:49 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:169282 Archived-At: Stefan Monnier writes: >>> In semantic/bovine/c-by.el there=E2=80=99s the following description: >>> ("void" summary "Built in typeless type: void") >>> Cute, but inaccurate: void is a type alright. I suggest changing >>> =E2=80=9Ctypeless type=E2=80=9D to =E2=80=9Cempty type=E2=80=9D. >> I don't quite think that "empty type" is more meaningful than "typeless >> type". At least to me, "typeless type" makes more sense, even if it is >> somewhat humorous. > > I beg to disagree: to a large extent, a type can be thought of as a set > of values. So a type can be empty (meaning that there is no value of > that type). But a "typeless type" is rather meaningless (in type > theory, types have themselves a type, so for example "1" has type "Int" > and "Int" has type "Type", but then a type can't be "typeless" since the > "definition" of a type is then basically "has type Type"). > > > Stefan > > > PS: Of course, in C the "void" type is more like the "unit" type than > like the empty type, i.e. a type with a single value which hence doesn't > carry any information. E.g. a function that returns a type void can > return, tho its return value carries no information ("it returns > nothing") whereas a function that returns the empty type is a function > that will never return (since there is no value in the empty type, the > function can never return a value of the right type). This still says "typeless type" 8 years later, which makes no sense to me either. Since the C "void" type does not map perfectly to neither the unit type nor the empty type, and also has the added confusion that "void*" pointers are quite different from functions with return type "void", perhaps we should just change it to: "Built in type: void" That should avoid any confusion, yet be clear enough for any C programmer. What do you think? Best regards, Stefan Kangas