caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@best.com>
To: Sven <luther@dpt-info.u-strasbg.fr>
Cc: <caml-list@inria.fr>
Subject: Re: [Caml-list] Haskell features in O'Caml
Date: Mon, 24 Sep 2001 08:29:02 -0700 (PDT)	[thread overview]
Message-ID: <20010924081901.G24529-100000@shell5.ba.best.com> (raw)
In-Reply-To: <20010924131427.A19055@dpt-info.u-strasbg.fr>

On Mon, 24 Sep 2001, Sven wrote:
[...snip alternatives for type annotation in OCaml ...]
> But you have to recognize that non of these solution is as elegant as the
> haskel way of doing it, isn't ti ?

Agreed. Though the original poster probably wan't interested, it's also
the case that Haskell can use the annotations to get polymorphic recursion
and OCamlists have to butcher the code by either rewriting into a sometimes
less clear form or applying the sledge hammer of the unsafe cast operation.

> maybe this would be nice :
>
> val mul : int -> int -> int
> let mul x y = ...
>
> Sure, i know the right way is to put the declaration of mul in a separate
> file, but still, it would be nice to be able to do it in one file only.

I think it makes sense to have the annotations *apart* from their use in
signatures. Someone else mentions the "debugging by adding type annotations"
style, which I've used a bit myself (I'm shameless) and has a lot of nice
aspects.

-- Brian


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  reply	other threads:[~2001-09-24 15:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-22 14:56 Arturo Borquez
2001-09-23 16:08 ` Florian Hars
2001-09-23 16:21 ` Mattias Waldau
2001-09-23 17:50   ` Dave Mason
2001-09-24 11:14     ` Sven
2001-09-24 15:29       ` Brian Rogoff [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-24 22:51 Christian.Schaller
2001-09-25  9:15 ` Remi VANICAT
2001-09-24 16:26 Christian.Schaller
2001-09-24 19:53 ` Remi VANICAT
2001-09-23 23:25 Arturo Borquez
2001-09-22 11:46 Steven Murdoch

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=20010924081901.G24529-100000@shell5.ba.best.com \
    --to=bpr@best.com \
    --cc=caml-list@inria.fr \
    --cc=luther@dpt-info.u-strasbg.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).