From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,SPF_SOFTFAIL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id A1F11BC68 for ; Wed, 15 Nov 2006 02:36:57 +0100 (CET) Received: from mail-eur.microsoft.com (mail-eur.microsoft.com [213.199.128.145]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kAF1avLf014350 for ; Wed, 15 Nov 2006 02:36:57 +0100 Received: from EUR-MSG-11.europe.corp.microsoft.com ([65.53.193.197]) by mail-eur.microsoft.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 15 Nov 2006 01:36:56 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] parameterized pattern Date: Wed, 15 Nov 2006 01:36:31 -0000 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Caml-list] parameterized pattern Thread-Index: AccIUiNW0xhevryiQuG/pxNDxBZE+AAAdYhg From: "Don Syme" To: "brogoff" , X-OriginalArrivalTime: 15 Nov 2006 01:36:56.0901 (UTC) FILETIME=[896A6750:01C70856] X-Miltered: at discorde with ID 455A6F39.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; syme:01 syme:01 fwiw:01 off-list:01 gcaml:01 clos:01 extensional:01 runtime:01 runtime:01 gcaml:01 clos:01 beginner's:01 ocaml:01 bug:01 persuade:98 [ 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=20 > 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. :-) =20 > What I didn't notice while looking at the F# docs was a=20 > way to declare a generic function/value, where by "generic"=20 > here I mean in the GCaml/CLOS sense, not the Java/Ada sense.=20 > 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