caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Safe UTF-8 string literals and pattern matching for OCaml
Date: Fri, 1 May 2015 23:19:32 +0200	[thread overview]
Message-ID: <78B832C46C5C4188BAB353814FD6742B@erratique.ch> (raw)
In-Reply-To: <C3DC6B285633420FB79BF6A60F4118CC@erratique.ch>

Le vendredi, 1 mai 2015 à 22:42, Daniel Bünzli a écrit :
> I don't think that multiplying *representations* is a good idea and a single canonical one should be eventually chosen for this in OCaml. So personally I'm not interested in that kind of extension.

Just to make that more clear.  

From a programming language design perspective and Unicode processing point of view you are not interested in dealing with *encodings* of Unicode scalar values in your programs. You are interested in dealing with Unicode scalar values themselves, the "characters". Encodings is only something that happens at the boundary of your programs when you IO your scalar values to sequences of bytes and/or something that is *hidden* behind your Unicode string abstraction. That's the reason why I don't want to have more than one representation.  

In the ppx_utf8_lit proposal this unique representation happens to be a (sadly but practically) non-abstract, particular, encoding, namely UTF-8. The advantage of this representation is an excellent, easy and costless integration 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 fragmented landscape.

Best,

Daniel



      reply	other threads:[~2015-05-01 21:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01 18:15 Daniel Bünzli
2015-05-01 20:13 ` Gabriel Scherer
2015-05-01 20:42   ` Daniel Bünzli
2015-05-01 21:19     ` Daniel Bünzli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=78B832C46C5C4188BAB353814FD6742B@erratique.ch \
    --to=daniel.buenzli@erratique.ch \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).