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=1.1 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 680BBBC68 for ; Wed, 15 Nov 2006 02:00:51 +0100 (CET) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id kAF10mGx027411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 15 Nov 2006 02:00:50 +0100 Received: (qmail 31829 invoked from network); 15 Nov 2006 01:00:47 -0000 Received: from shell2.sea5.speakeasy.net ([69.17.116.3]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 15 Nov 2006 01:00:47 -0000 Date: Tue, 14 Nov 2006 17:00:47 -0800 (PST) From: brogoff To: caml-list@yquem.inria.fr Subject: RE: [Caml-list] parameterized pattern In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde with ID 455A66C0.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; syme:01 extensional:01 runtime:01 runtime:01 gcaml:01 clos:01 wrote:01 caml-list:01 speakeasy:01 generics:01 generics:01 parameters:02 types:03 pattern:04 brian:05 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