caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eijiro Sumii <eijiro.sumii@gmail.com>
To: caml-list@yquem.inria.fr
Cc: Jon Harrop <jon@ffconsultancy.com>
Subject: Re: [Caml-list] ambitious proposal: polymorphic arithmetics
Date: Fri, 8 Apr 2005 23:16:18 -0400	[thread overview]
Message-ID: <a4d0794e05040820164ecee4a0@mail.gmail.com> (raw)
In-Reply-To: <200504090358.38088.jon@ffconsultancy.com>

> I'm just curious, but what would you have expected the result of:
> 
> # (1, 2, 3) * (2, 3, 4);;
> 
> to be? i.e. an inner product, element-wise multiplication or an outer product?

Right, it is one of the difficult cases, but in general I just had
simple element-wise operations (of type 'a -> 'a -> 'a) in mind.

> > If so, I can perhaps restate my question as: why is the line drawn between =
> > and + now?
> 
> I would say that polymorphic comparisons are useful in many more circumstances
> than polymorphic arithmetics would be, so their inclusion is justified.

Yes, I agree polymorphic equality can be more useful in practice,
though I'm not very sure about polymorphic inequalities (perhaps
except for the purpose of ordering when implementing containers such
as sets, trees, ...), in particular concerning abstract types as
somebody else mentioned...?

        Eijiro


      reply	other threads:[~2005-04-09  3:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-06 15:15 Eijiro Sumii
2005-04-06 15:51 ` [Caml-list] " Sébastien Hinderer
2005-04-06 15:56 ` Richard Jones
2005-04-06 16:43   ` Dmitry Lomov
2005-04-06 18:59     ` Richard Jones
2005-04-06 19:19       ` Jacques Carette
2005-04-07  0:01       ` Ethan Aubin
2005-04-06 16:39 ` [Caml-list] " William Lovas
2005-04-06 16:59   ` Andreas Rossberg
2005-04-06 18:50   ` Eijiro Sumii
2005-04-06 19:33   ` Eijiro Sumii
2005-04-07  0:13     ` William Lovas
2005-04-07  1:58       ` Jacques Garrigue
2005-04-06 17:00 ` Christophe TROESTLER
2005-04-06 19:20   ` Eijiro Sumii
2005-04-07 14:00     ` Christophe TROESTLER
2005-04-06 17:23 ` Marcin 'Qrczak' Kowalczyk
2005-04-06 18:01   ` padiolea
2005-04-06 19:14     ` Eijiro Sumii
2005-04-06 20:31       ` Eijiro Sumii
2005-04-06 21:53         ` Marcin 'Qrczak' Kowalczyk
2005-04-06 22:38           ` Eijiro Sumii
2005-04-06 19:23     ` Richard Jones
2005-04-09  2:58 ` Jon Harrop
2005-04-09  3:16   ` Eijiro Sumii [this message]

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=a4d0794e05040820164ecee4a0@mail.gmail.com \
    --to=eijiro.sumii@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@ffconsultancy.com \
    /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).