unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
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: Sun, 11 Sep 2011 05:30:24 +0200	[thread overview]
Message-ID: <m3sjo3ycvj.fsf@stories.gnus.org> (raw)
In-Reply-To: <jwvvcszsr81.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 10 Sep 2011 23:25:10 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> 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).

I was thinking more of functions that take void* as a parameter.  What's
usually expressed by that is "here's some memory that we're not actually
telling you what the type of is explicitly", so it's (sort of) a pointer
to something typeless.  It's not a pointer to something of an empty
type.  :-)

So calling "void" a "typeless type" makes some sense.  At least to me --
in a C context.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





  reply	other threads:[~2011-09-11  3:30 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
2011-09-11  3:30     ` Lars Magne Ingebrigtsen [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m3sjo3ycvj.fsf@stories.gnus.org \
    --to=larsi@gnus.org \
    --cc=9222@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).