From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 20B7C7FA30 for ; Mon, 14 Jul 2014 19:45:40 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rich@annexia.org) identity=pra; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rich@annexia.org designates 80.68.91.176 as permitted sender) identity=mailfrom; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@furbychan.cocan.org) identity=helo; client-ip=80.68.91.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="postmaster@furbychan.cocan.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcNAK0WxFNQRFuw/2dsb2JhbABZgw6tRQUBAQEBAQEFAW6bfwGBFxZ1hAQBBTpPCxgJExIPBQ0bNIguAxUBwRoNhwsXhXsvhnSCNBaDF4EWBZkOgX+OCIYXg0U8 X-IPAS-Result: ArcNAK0WxFNQRFuw/2dsb2JhbABZgw6tRQUBAQEBAQEFAW6bfwGBFxZ1hAQBBTpPCxgJExIPBQ0bNIguAxUBwRoNhwsXhXsvhnSCNBaDF4EWBZkOgX+OCIYXg0U8 X-IronPort-AV: E=Sophos;i="5.01,659,1400018400"; d="scan'208";a="85117541" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 14 Jul 2014 19:45:39 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.80) (envelope-from ) id 1X6kJm-0000KQ-My for caml-list@inria.fr; Mon, 14 Jul 2014 18:45:38 +0100 Date: Mon, 14 Jul 2014 18:45:38 +0100 From: "Richard W.M. Jones" To: caml-list@inria.fr Message-ID: <20140714174538.GB30965@annexia.org> References: <1404501528.4384.4.camel@e130> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] Immutable strings On Tue, Jul 08, 2014 at 08:15:39PM +0200, mattiasw@gmail.com wrote: > My two cents: > > To me it seems very strange to introduce a new string type and not make it > UTF-8 from start. I would far prefer that OCaml did *not* specify an encoding for string, and just left them as effectively array of bytes as now. This leaves the business of encoding UTF-8 up to higher layers, either camomile, iconv or the database. That would imply removing incorrect functions like String.uppercase and String.lowercase. There are a couple of reasons for this: (1) It's easy to get Unicode wrong, and baking incorrect Unicode into the language could be worse than not having it at all. See also: Java, Python 2, Ruby, everything using the Win32 API. (2) Doing it right is incredibly complex. See also: Perl 5. Rich. -- Richard Jones Red Hat