caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dylan William Hardison <dylan@hardison.net>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] "OCaml gives you only monomorphic methods in classes."
Date: Fri, 28 Dec 2007 23:31:02 -0500	[thread overview]
Message-ID: <20071229043102.GA22870@hardison.net> (raw)
In-Reply-To: <200712282337.23952.jon@ffconsultancy.com>

Spake Jon Harrop on Friday, December 28, 2007 at 11:37PM +0000:
> 
> I just read this quote and I do not understand what it means:
> 
>   "In particular, the Hindley/Milner style of type inference used in languages 
> such as OCaml or Haskell is incompatible with lots of assumptions of OO 
> languages. One incompatibility is with overloading. That's why OCaml does not 
> let you write + for both integer and floating point addition. Another 
> incompatibility is with higher order polymorphism. That's why OCaml gives you 
> only monomorphic methods in classes." - Martin Odersky

This seems correct for O'Caml (and SML?) but not Haskell.
Haskell's type system is extended with type classes, which allow + and such to
be overloaded...

-- 
"Regardless of the legal speed limit, your Buick must be operated at
speeds faster than 85 MPH (140kph)."
              -- 1987 Buick Grand National owners manual.
-
GPG Fingerprint: 412C CCE9 DDA2 4FE9 C34F  754B 0863 0EA6 712E BBE1


  parent reply	other threads:[~2007-12-29  4:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-28 23:37 Jon Harrop
2007-12-28 23:55 ` [Caml-list] " Gordon Henriksen
2007-12-29  0:27   ` Jon Harrop
2007-12-29  1:19     ` Gordon Henriksen
2007-12-29  1:30       ` Jon Harrop
2007-12-31 14:02       ` Kuba Ober
2007-12-29  4:31 ` Dylan William Hardison [this message]
2007-12-29  7:09   ` Jon Harrop
2007-12-29  6:30 ` brogoff
2007-12-29  7:11   ` Jon Harrop
2007-12-29 16:57     ` brogoff
2008-01-08  2:30     ` Jacques Garrigue
2008-01-08  9:42       ` Jon Harrop
2008-01-08 13:45         ` Peng Zang
2008-01-08 17:29         ` brogoff
2008-01-08 21:25         ` Paolo Donadeo

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=20071229043102.GA22870@hardison.net \
    --to=dylan@hardison.net \
    --cc=caml-list@yquem.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).