From: Vasile Rotaru <vrotaru@seznam.cz>
To: Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] subtyping, polymorphism, higher order types.....
Date: Fri, 4 Jul 2003 22:45:21 +0200 [thread overview]
Message-ID: <20030704224521.7db3450f.vrotaru@seznam.cz> (raw)
In-Reply-To: <3F043EAB.70503@mitre.org>
On Thu, 03 Jul 2003 10:33:15 -0400
Shaddin Doghmi <shaddin@mitre.org> wrote:
> In my experiences with ocaml, one of the major frustrations i
> constantly run into is the lack of subtyping. [..]
The Shaddin message (and other influences -- the most notable being
the Oberon language) had induced me to an idea which I offer here for
discussion. Open (or extensible) product types. Something like this
type point = int * int * _ ;;
where the underscore stands for any sequences of types. Colour, taste,
strangeness, etc.
Now a function designed to work with with "point" will work with any
type which is a "point" extension. Just now I cannot think of a good
"ocamlish" syntax for extending types. Maybe?
type color_point = <point> * int * _
The big question is what this will do with the type system of Ocaml
and whether it worth the pain..
> just a few thoughts.....
>
just a few thoughts
Vasile Rotaru
--
They spell it "da Vinci" and pronounce it "da Vinchy". Foreigners
always spell better than they pronounce.
-- Mark Twain
-------------------
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
next prev parent reply other threads:[~2003-07-04 21:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-03 14:33 Shaddin Doghmi
2003-07-03 16:23 ` brogoff
2003-07-04 6:43 ` Daniel Weil
2003-07-04 20:45 ` Vasile Rotaru [this message]
2003-07-05 2:21 ` Jacques Garrigue
2003-07-05 7:46 ` Fernando Alegre
2003-07-05 15:07 ` Vasile Rotaru
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=20030704224521.7db3450f.vrotaru@seznam.cz \
--to=vrotaru@seznam.cz \
--cc=caml-list@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