From: "Don Syme" <Don.Syme@microsoft.com>
To: "brogoff" <brogoff@speakeasy.net>, <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] parameterized pattern
Date: Wed, 15 Nov 2006 01:36:31 -0000 [thread overview]
Message-ID: <D5DD834CDA73854DA0ADC8B3C953C681066F91CC@EUR-MSG-11.europe.corp.microsoft.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0611141521120.22799@shell2.speakeasy.net>
[ FWIW let's take discussions about F# off-list, e.g. to hubFS? ]
> As a mostly Java programmer now, I have to say I'm a bit
> envious. C# generics look a lot better to me than the Java 5 ones.
Well, this comparison point certainly helped to persuade Microsoft
management to do the feature. :-)
> What I didn't notice while looking at the F# docs was a
> way to declare a generic function/value, where by "generic"
> here I mean in the GCaml/CLOS sense, not the Java/Ada sense.
> Is something like that in F#, or planned?
Yes and no, though the topic often comes up. Currently, operators are
overloaded through a statically-resolved version of Ada-style trait
constraints, which works well enough in practice.
Haskell-style type classes or the proposed default parameters for Scala
are other possible design points. These are a little less compelling
when you can't redesign the whole .NET library design to take advantage
of the feature, but still potentially worthwhile.
Best wishes,
Don
-----Original Message-----
From: caml-list-bounces@yquem.inria.fr
[mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of brogoff
Sent: 15 November 2006 01:01
To: caml-list@yquem.inria.fr
Subject: RE: [Caml-list] parameterized pattern
On Tue, 14 Nov 2006, Don Syme wrote:
> > I just did a quick scan of some F# docs and
> > I saw nothing. What did you have in mind?
>
> .NET type parameters are extensional, i.e. "you can always find out
what
> 'a is at runtime". In particular in C# you can just write
"typeof(T)",
> and in F# "(type 'a)", in each case getting a System.Type value.
> Supporting exact runtime types was a design decision we made in the
> early design stages for .NET generics.
As a mostly Java programmer now, I have to say I'm a bit envious. C#
generics
look a lot better to me than the Java 5 ones.
What I didn't notice while looking at the F# docs was a way to declare
a generic function/value, where by "generic" here I mean in the
GCaml/CLOS
sense, not the Java/Ada sense. Is something like that in F#, or planned?
-- Brian
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
next prev parent reply other threads:[~2006-11-15 1:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-06 21:15 Serge Aleynikov
2006-11-06 23:58 ` [Caml-list] " Jon Harrop
2006-11-07 0:12 ` Serge Aleynikov
2006-11-06 23:59 ` Martin Jambon
2006-11-08 23:55 ` Lukasz Stafiniak
2006-11-09 1:45 ` brogoff
2006-11-09 5:19 ` Jon Harrop
2006-11-09 8:51 ` skaller
2006-11-09 16:22 ` brogoff
2006-11-09 17:55 ` skaller
2006-11-14 23:12 ` Don Syme
2006-11-15 1:00 ` brogoff
2006-11-15 1:36 ` Don Syme [this message]
2006-11-09 5:18 ` Jon Harrop
2006-11-09 16:42 ` micha
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=D5DD834CDA73854DA0ADC8B3C953C681066F91CC@EUR-MSG-11.europe.corp.microsoft.com \
--to=don.syme@microsoft.com \
--cc=brogoff@speakeasy.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