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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 1A41DBBB7 for ; Mon, 22 Sep 2008 00:30:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjoCAMZn1khKfU4YnGdsb2JhbACCKpA2PgEBAQEBCAkMBxGbCIVWAQI X-IronPort-AV: E=Sophos;i="4.32,443,1217800800"; d="scan'208";a="15197962" Received: from ey-out-2122.google.com ([74.125.78.24]) by mail2-smtp-roc.national.inria.fr with ESMTP; 22 Sep 2008 00:29:59 +0200 Received: by ey-out-2122.google.com with SMTP id 6so334000eyi.15 for ; Sun, 21 Sep 2008 15:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:organization:to:subject:date :user-agent:mime-version:content-type:content-transfer-encoding :content-disposition:message-id:from; bh=Yg5iI1/R5twd3OQh/8XxtrjJm9ZSxN9dNgxOJkw2Wrw=; b=uOfiK7DubRlLnIOg8AZi8uAM21VowwtQ7JsEJBV0dWgjfVDIUnoHcpVDU6/+m0/7GI mKOZwfJOOYoMtXpwvSTNbJaKsZPz5BO3yC/ynsqN9dbSY37wYg6I26FzTocXuc4kjNuD slsiJQL51I1pNt4ASBnu60rjE6gp9PNxDSs2k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=organization:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:content-disposition:message-id:from; b=EpG4Za7OBuM85vTGkUQDgbnXOEe1g51Of+ddv5AM4h9j/krKevs/UCDjxcg2I13yFe YLC02wpRD1iiiCUIJuOOiPuRyUf8mNFrNVGJcRmNcs8k1g50HFxP0WAQ6i5nTgoGaIag RZXLVfAD8KEA1TpYWNipVX8ai3mvLlnNFbwB0= Received: by 10.210.51.18 with SMTP id y18mr3893809eby.160.1222036199345; Sun, 21 Sep 2008 15:29:59 -0700 (PDT) Received: from leper.local ( [86.140.183.215]) by mx.google.com with ESMTPS id f13sm8752345gvd.10.2008.09.21.15.29.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 21 Sep 2008 15:29:59 -0700 (PDT) Organization: Flying Frog Consultancy Ltd. To: caml-list Subject: Measures Date: Mon, 22 Sep 2008 00:30:31 +0100 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809220030.31468.jon@ffconsultancy.com> From: Jon Harrop X-Spam: no; 0.00; statically:01 ocaml:01 frog:98 typing:01 arithmetic:01 constraints:03 handles:03 programming:03 types:05 representing:05 mere:92 phantom:07 feature:09 wondering:09 wrong:10 This latest post about statically typing constraints beyond mere floating-point values reminds me that the F# programming language just got another new feature called "measures" that lets you add phantom types representing units of measure and even handles arithmetic over them for you. I have not used measures yet myself but I was just wondering if the OCaml world had already seen anything like this? I had been under the impression that this could not be made to work but, obviously, I was wrong! -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e