From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p3UB3puA025507 for ; Sat, 30 Apr 2011 13:03:51 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmkBAEjsu03RVdg+fGdsb2JhbACYEz+NPggUAQELCQsbBiGoFop8hlM0iGOGAASGDoMLkBo7g00 X-IronPort-AV: E=Sophos;i="4.64,292,1301868000"; d="scan'208";a="82058528" Received: from mail-qw0-f62.google.com ([209.85.216.62]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 30 Apr 2011 13:03:45 +0200 Received: by qwj9 with SMTP id 9so13383262qwj.27 for ; Sat, 30 Apr 2011 04:03:44 -0700 (PDT) Received: by 10.224.32.129 with SMTP id c1mr620592qad.40.1304161424842; Sat, 30 Apr 2011 04:03:44 -0700 (PDT) Path: glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: fa.caml Date: Sat, 30 Apr 2011 04:03:44 -0700 (PDT) In-Reply-To: Reply-To: fa.caml@googlegroups.com Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=138.37.88.134; posting-account=e5mzsQoAAAB7g9y7Bkgam0zJDHRr7bCB NNTP-Posting-Host: 138.37.88.134 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: From: Radu Grigore To: fa.caml@googlegroups.com Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Differences between Array and Strings On Friday, April 29, 2011 12:51:59 PM UTC+1, louis....@ens.fr wrote: > > let l () = "1" ;; > > [...] > > l()==l();; > # val l : unit -> string = > # [...] > # - : bool = true Is there a good reason for this behavior? My first thought was that that code should behave the same as let f () = ref () in f () == f () (A satisfying explanation would *not* involve the compiler.)