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.5 required=5.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 4C976BC69 for ; Fri, 30 Mar 2007 03:26:06 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2U1Q5fL012465 for ; Fri, 30 Mar 2007 03:26:06 +0200 Received: by ug-out-1314.google.com with SMTP id q2so745002uge for ; Thu, 29 Mar 2007 18:26:05 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=BlsX/qHRsaJSiLeoNgBWF9mRWLdFdezpFjNIaoahHujYTLTHBJ2OoDR/VvDkeNb2iSOMjDtKc6WuddlfgGXsGG2NetWMBx4u4nGMk5g/pekrG6hhC8wSAyQFOHrtMIIQ2kduxJaCqTUa/YDPCF+tURbd1cOiMAYvkOW8Iwrgof0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=BJLM2Sd1es0H0YkjOfqqWPhGtXInTOFNUgLTd0IlHjKQr2FWuRFrcW6qN/vp5lZvyHZypomYSSypAXjnUrqOBgNwj0eHmmWHuYjcN2rVEmacb7M37ayck74EPWnCB1IU33LTN037wyufziMBSfhAN0DzH6HplBGUM+QDC9VqVVk= Received: by 10.114.208.8 with SMTP id f8mr526641wag.1175217964628; Thu, 29 Mar 2007 18:26:04 -0700 (PDT) Received: by 10.115.55.5 with HTTP; Thu, 29 Mar 2007 18:26:04 -0700 (PDT) Message-ID: <891bd3390703291826k6002ef28i93bca9944cdbceee@mail.gmail.com> Date: Thu, 29 Mar 2007 21:26:04 -0400 From: "Yaron Minsky" Sender: yminsky@gmail.com To: "Brian Hurt" Subject: Re: [Caml-list] int_of_string bug Cc: caml-list In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_55827_32960381.1175217964552" References: <891bd3390703290927o4e1c6bb5gf8f562fedbc70096@mail.gmail.com> X-Google-Sender-Auth: 362232b43a7f1640 X-Miltered: at discorde with ID 460C672D.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; yaron:01 minsky:01 yminsky:01 bug:01 ocaml's:01 beginner's:01 ocaml:01 bug:01 ocaml's:01 beginner's:01 ocaml:01 beginners:01 beginners:01 wrote:01 wrote:01 ------=_Part_55827_32960381.1175217964552 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 3/29/07, Brian Hurt wrote: > > > Wether this behavior (silent wrap around) is correct or not is another > argument. Elsewhere I have opinioned that the only purpose for having > more than one type of integer in your programming language is so that > programmers can pick the wrong one. But I'm widely known to be a heretic. > > Ocaml's behavior is, at least, *consistent*. Not really all that consistent: # int_of_string "1073741824";; - : int = -1073741824 # int_of_string "1073741825";; Exception: Failure "int_of_string". # y 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 > ------=_Part_55827_32960381.1175217964552 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 3/29/07, Brian Hurt <bhurt@spnz.org> wrote:

Wether this behavior (silent wrap around) is correct or not is another
argument.  Elsewhere I have opinioned that the only purpose for having
more than one type of integer in your programming language is so that
programmers can pick the wrong one.  But I'm widely known to be a heretic.

Ocaml's behavior is, at least, *consistent*.

Not really all that consistent:

# int_of_string "1073741824";;
- : int = -1073741824
# int_of_string "1073741825";;
Exception: Failure "int_of_string".

y

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

------=_Part_55827_32960381.1175217964552--