caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ambitious proposal: polymorphic arithmetics
@ 2005-04-06 15:15 Eijiro Sumii
  2005-04-06 15:51 ` [Caml-list] " Sébastien Hinderer
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Eijiro Sumii @ 2005-04-06 15:15 UTC (permalink / raw)
  To: caml-list; +Cc: sumii

Hi once again,

Well, I asked the same question many years ago, but I'm afraid I
didn't receive satisfactory answers at that time, perhaps because I
was just a nameless student.:-) Now that my colleagues and I won the
ICFP programming contest twice (as well as organizing it once) and
published two POPL papers, I dare to raise the same question again,
hoping I'll receive more reasonable responses this time...;-)

So here it goes: why don't we have polymorphic +, -, etc. while we
have polymorphic =, <, etc.?  Many novices and (at least) some experts
feel that +., -., etc. are not quite nice.  Why not define +, -,
etc. for as many types as possible such as integers, floating-point
numbers, and tuples?  I think they can be implemented almost in the
same efficient way as =.  They can also raise an exception if applied
to unsupported values such as functions, just as = does.

P.S. I believe I'm not proposing anything as serious as Haskell type
classes.

--
Eijiro Sumii (http://www.cis.upenn.edu/~sumii/)
Department of Computer and Information Science, University of Pennsylvania


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2005-04-09  3:16 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-06 15:15 ambitious proposal: polymorphic arithmetics 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 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).