Browse thread
stl?
-
Raoul Duke
- Yoann Padioleau
-
Jon Harrop
-
Brian Hurt
-
Yoann Padioleau
-
Brian Hurt
-
Yoann Padioleau
-
Brian Hurt
- Yoann Padioleau
-
Jon Harrop
-
Brian Hurt
- David Rajchenbach-Teller
-
Brian Hurt
-
Brian Hurt
-
Yoann Padioleau
-
Brian Hurt
- Jon Harrop
- Martin Jambon
-
Yoann Padioleau
-
Brian Hurt
- Mikkel_Fahnøe_Jørgensen
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Rajchenbach-Teller <David.Teller@e...> |
| Subject: | Re: [Caml-list] stl? |
On Tue, 2009-03-10 at 23:16 -0400, Brian Hurt wrote: > This isn't a limitation of the language, this is simply a short comming of > the standard libraries. It works in Batteries, btw. > Ord t => let foo (x: t) (y : t) = ... > > is the same as: > > module Foo(X: Ord) = struct > type t = X.t;; > open X;; > let foo (x: t) (y: t) = ... > end;; > > or something. And some similar bit of syntactic sugar to make > instantiating a functor lower cost as well. Obviously this idea has some > problems. My point is that is that it should be possible to come up with > some sort of reasonable extension of the language to allow functors to be > more "type-class like". How would you determine that "=>" or "foo" maps to "Foo"? IMHO, that's the main problem with getting typeclasses in OCaml. Cheers, David -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller « Ce matin Un crétin A tué un chercheur. » (air connu) Latest News of French Research: System being liquidated. Researchers angry.