caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Why doesn't ocamlopt detect a missing ; after failwith statement?
Date: Mon, 29 Nov 2004 08:52:56 +0100	[thread overview]
Message-ID: <874qj9852f.fsf@qrnik.zagroda> (raw)
In-Reply-To: <20041129.090151.110958815.garrigue@math.nagoya-u.ac.jp> (Jacques Garrigue's message of "Mon, 29 Nov 2004 09:01:51 +0900 (JST)")

Jacques Garrigue <garrigue@math.nagoya-u.ac.jp> writes:

> My point was just that, looking at the way void is used in C, it
> clearly does not have the usual proporties of zero, and among them
> the fact no function should be able to return zero, or that all
> pointers to void should be NULL.

Rules of void in C are special. In particular it makes no sense to
draw conclusions about "the number of values of type void" from the
semantics of pointers to void.

There are no values of type void, no variables of type void,
and no function arguments of type void. You can't write
   void deref(void *p) {return *p;}
and this is valid only in C++, not in C:
   void f();
   void g() {return f();}

There are no values of type void. A C function either produces a value
or not. If it does not, it's written by putting 'void' instead of its
return type.

A pointer to void holds an address of some value, not an address of
a value of type void.

Trying to treat 'void' analogously to other types will show
inconsistencies and lead to contradictions.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


  reply	other threads:[~2004-11-29  7:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-25 20:46 Richard Jones
2004-11-25 21:14 ` [Caml-list] " Nicolas Cannasse
2004-11-26  0:11   ` skaller
2004-11-26  0:44     ` Jacques Garrigue
2004-11-26  3:08       ` skaller
2004-11-26  5:25         ` Jacques Garrigue
2004-11-26  7:08           ` Nicolas Cannasse
2004-11-26 14:42             ` Jacques Garrigue
2004-11-26 17:01               ` Alain Frisch
2004-11-26 19:36             ` Michal Moskal
2004-11-26 17:01           ` Damien Doligez
2004-11-29  0:40             ` Jacques Garrigue
2004-11-29 11:07               ` [Caml-list] Why doesn't ocamlopt detect a missing ; afterfailwith statement? Frederic van der Plancke
2004-11-29 11:43                 ` Jacques Garrigue
2004-11-29 11:27               ` Frederic van der Plancke
2004-11-26 22:24           ` [Caml-list] Why doesn't ocamlopt detect a missing ; after failwith statement? Hendrik Tews
2004-11-27  3:47             ` skaller
2004-11-29  0:01             ` Jacques Garrigue
2004-11-29  7:52               ` Marcin 'Qrczak' Kowalczyk [this message]
2004-11-26  3:58       ` skaller
2004-11-26 19:16     ` Brian Hurt
2004-11-26  9:01   ` Richard Jones
2004-11-26  9:56     ` skaller
2004-11-26 13:32     ` Ville-Pertti Keinonen

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=874qj9852f.fsf@qrnik.zagroda \
    --to=qrczak@knm.org.pl \
    --cc=caml-list@inria.fr \
    /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.
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 NNTP newsgroup(s).