From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 87DF2BC29 for ; Wed, 9 Aug 2006 08:13:24 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k796DNeb002648 for ; Wed, 9 Aug 2006 08:13:24 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA04388 for ; Wed, 9 Aug 2006 08:13:23 +0200 (MET DST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k796DMwI002638 for ; Wed, 9 Aug 2006 08:13:23 +0200 Received: by nf-out-0910.google.com with SMTP id o25so38625nfa for ; Tue, 08 Aug 2006 23:13:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dfJlNPb3Jr956rMVRomwo6aJHfV7Nwi+Jp4NqOqr5E8KF8ZE06cigQpiUJSIBbyHyFKYfouP4SBh0gPNNXuy0yr5Yr4uAgyhrkCss3VQdgW7jRS3oUNCVhnD4aZh3sFTGtpXfSdmxrxt2wLdrCUNAI1pqK58sC4wbFZ1IzCiH0Y= Received: by 10.78.160.2 with SMTP id i2mr163474hue; Tue, 08 Aug 2006 23:13:20 -0700 (PDT) Received: by 10.78.194.4 with HTTP; Tue, 8 Aug 2006 23:13:20 -0700 (PDT) Message-ID: Date: Wed, 9 Aug 2006 18:13:20 +1200 From: "Jonathan Roewen" To: "Oliver Bandel" Subject: Re: [Caml-list] Arg-module: Float-Args also accept integer values Cc: caml-list@inria.fr In-Reply-To: <20060809055436.GF4473@first.in-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060808221224.GC3719@first.in-berlin.de> <78109874304-BeMail@beos> <20060809055436.GF4473@first.in-berlin.de> X-j-chkmail-Score: MSGID : 44D97D02.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44D97D03.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44D97D02.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; choosen:01 bug:01 ocaml's:01 libs:01 imho:01 caml-list:01 compile:01 integer:01 implemented:02 checking:02 string:02 arg:03 float:03 usability:04 converting:05 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 > I don't care about the implementation-details here, > and both ways of converting would make sense, IMHO. > But I want to have clear why this atof-like way was choosen. > So, it's a design-decision-question (and one that could > reference to a bug, if the OCaml's type-system way was, > what initially was intended, but not implemented (for some reason). Okay then. How about usability? Do you want your end-users to be picky over adding a decimal point in order to provide a floating point arg? The decimal point requirement is for the programmers, not the users; therefore, the float_of_string design is sensible. w.r.t the sql example, it is possible (cf. linq for C#, or one of those pgocaml libs which does compile time checking of sql queries). Jonathan