all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: Reuben Thomas <rrt@sc3d.org>, 9222@debbugs.gnu.org
Subject: bug#9222: 23.3.50; "void" is not "typeless" (but thanks for the koan!)
Date: Sat, 10 Sep 2011 23:25:10 -0400	[thread overview]
Message-ID: <jwvvcszsr81.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m3zkib7sac.fsf@stories.gnus.org> (Lars Magne Ingebrigtsen's message of "Sun, 11 Sep 2011 03:59:39 +0200")

>> In semantic/bovine/c-by.el there’s the following description:
>> ("void" summary "Built in typeless type: void")
>> Cute, but inaccurate: void is a type alright. I suggest changing
>> “typeless type” to “empty type”.
> 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).






  reply	other threads:[~2011-09-11  3:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 13:12 bug#9222: 23.3.50; "void" is not "typeless" (but thanks for the koan!) Reuben Thomas
2011-09-11  1:59 ` Lars Magne Ingebrigtsen
2011-09-11  3:25   ` Stefan Monnier [this message]
2011-09-11  3:30     ` Lars Magne Ingebrigtsen
2011-09-11  4:56       ` Stefan Monnier
2011-09-11  8:13         ` Reuben Thomas
2011-09-11  8:45           ` Andreas Schwab
2011-09-11 14:38             ` Drew Adams
2011-09-12 12:39           ` Stefan Monnier
2019-10-14 16:08 ` Stefan Kangas
2019-10-14 19:01   ` Stefan Monnier
2019-10-14 19:38     ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvvcszsr81.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=9222@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=rrt@sc3d.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.