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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id E50A07FCCB for ; Fri, 1 May 2015 23:20:02 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CoAgDF7ENVnEpWN0pch1jCNwEGh1cCghEOAQEBAQEBAREBAQEBAQYNCQkhLoQhAQEEI1YQCxoCJgICRxAGG4gjBLNskyABCgEBAR6BIYoXhFIzB4JoL4EWAQSdXIYMD4pvg1CBA4EkH4FTgzIBAQE X-IPAS-Result: A0CoAgDF7ENVnEpWN0pch1jCNwEGh1cCghEOAQEBAQEBAREBAQEBAQYNCQkhLoQhAQEEI1YQCxoCJgICRxAGG4gjBLNskyABCgEBAR6BIYoXhFIzB4JoL4EWAQSdXIYMD4pvg1CBA4EkH4FTgzIBAQE X-IronPort-AV: E=Sophos;i="5.13,352,1427752800"; d="scan'208";a="114239268" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail3-smtp-sop.national.inria.fr with ESMTP; 01 May 2015 23:20:01 +0200 Received: from [172.20.10.2] (5.229.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch [178.197.229.5]) by smtp.webfaction.com (Postfix) with ESMTP id 7A7CC210467F; Fri, 1 May 2015 21:19:37 +0000 (UTC) Date: Fri, 1 May 2015 23:19:32 +0200 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Gabriel Scherer Cc: Ocaml Mailing List Message-ID: <78B832C46C5C4188BAB353814FD6742B@erratique.ch> In-Reply-To: References: <33523412539540019A672C80600DED12@erratique.ch> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Caml-list] Safe UTF-8 string literals and pattern matching for OCaml Le vendredi, 1 mai 2015 =C3=A0 22:42, Daniel B=C3=BCnzli a =C3=A9crit : > I don't think that multiplying *representations* is a good idea and a sin= gle canonical one should be eventually chosen for this in OCaml. So persona= lly I'm not interested in that kind of extension. Just to make that more clear.=20=20 >From a programming language design perspective and Unicode processing point= of view you are not interested in dealing with *encodings* of Unicode scal= ar values in your programs. You are interested in dealing with Unicode scal= ar values themselves, the "characters". Encodings is only something that ha= ppens at the boundary of your programs when you IO your scalar values to se= quences of bytes and/or something that is *hidden* behind your Unicode stri= ng abstraction. That's the reason why I don't want to have more than one re= presentation.=20=20 In the ppx_utf8_lit proposal this unique representation happens to be a (sa= dly but practically) non-abstract, particular, encoding, namely UTF-8. The = advantage of this representation is an excellent, easy and costless integra= tion with OCaml's existing string design which happened a long time ago in = times where the character encoding business was still a very messy and frag= mented landscape. Best, Daniel