Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: "Robert M. Solovay" <solovay@Math.Berkeley.EDU>
Cc: David Brown <caml-list@davidb.org>,
	Jon Harrop <jon@jdh30.plus.com>, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Polymorphism and the "for" loop
Date: 22 Oct 2004 16:19:23 +1000	[thread overview]
Message-ID: <1098425963.7584.9.camel@pelican.wigram> (raw)
In-Reply-To: <Pine.SOL.4.44.0410211921030.29298-100000@blue1>

On Fri, 2004-10-22 at 12:22, Robert M. Solovay wrote:
> How does one define a function f of type int -> void? I looked in the
> OCaml manual and couldn't find any reference to "void". {It is, of course,
> a familiar concept in C.}

That's right. Ocaml has no void type. I consider that a bug.
Briefly, it was possible to define one using polymorphic variants:

	type void = []

however that feature was removed. In any case that would
not be enough, since many standard functions would still
return the wrong type.

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-10-22  6:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 18:50 Jon Harrop
2004-10-21 19:11 ` David Brown
2004-10-22  1:19   ` skaller
2004-10-22  2:22     ` Robert M. Solovay
2004-10-22  6:19       ` skaller [this message]
2004-10-22  7:38         ` Jon Harrop
2004-10-22  8:06           ` David Brown
2004-10-22  9:39             ` Andreas Rossberg
2004-10-22  8:13           ` William Lovas
2004-10-22  8:17             ` Jon Harrop
2004-10-22 14:02           ` skaller
2004-10-22 14:31             ` David Brown
2004-10-22 17:06         ` Brian Hurt
2004-10-22  4:17     ` William Lovas
2004-10-22  6:42       ` skaller
2004-10-21 19:12 ` Ville-Pertti Keinonen
2004-10-21 19:20   ` Jon Harrop
2004-10-21 19:42     ` Ville-Pertti Keinonen
2004-10-23 11:41 ` Richard Jones
2004-10-23 12:06   ` Matti Jokinen
2004-10-22 14:07 Harrison, John R
2004-10-22 14:45 ` John Carr
2004-10-23 20:58   ` Christophe Raffalli
2004-10-22 14:47 ` Andreas Rossberg
2004-10-22 16:00 Harrison, John R

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=1098425963.7584.9.camel@pelican.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@davidb.org \
    --cc=caml-list@inria.fr \
    --cc=jon@jdh30.plus.com \
    --cc=solovay@Math.Berkeley.EDU \
    /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