caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
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 22:13:42 +0200	[thread overview]
Message-ID: <CAPFanBH4QB8jMM1a=Rm0+N+dVcCrT8RMOfUMmfJQPqTuU28D5A@mail.gmail.com> (raw)
In-Reply-To: <33523412539540019A672C80600DED12@erratique.ch>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

I wonder whether a system based on extensions [%u "..."] rather than
attributes "..." [@u] could be easier to extend in the future. For example,
you might want to introduce a different annotation `u16` that generates an
integer array representing an utf16-encoded literal (or an abstract type of
your liking, but then not in pattern position). Having an annotation change
the type of the code would not be very nice.

On Fri, May 1, 2015 at 8:15 PM, Daniel Bünzli <daniel.buenzli@erratique.ch>
wrote:

> Hello,
>
> If you ever wanted to have that *safely* you may want to checkout this
> experimental ppx:
>
> https://github.com/dbuenzli/ppx_utf8_lit
>
> Here's the design rationale:
>
> https://github.com/dbuenzli/ppx_utf8_lit#rationale
>
> Feedback welcome,
>
> Daniel
>
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

[-- Attachment #2: Type: text/html, Size: 1837 bytes --]

  reply	other threads:[~2015-05-01 20:14 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 [this message]
2015-05-01 20:42   ` Daniel Bünzli
2015-05-01 21:19     ` Daniel Bünzli

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='CAPFanBH4QB8jMM1a=Rm0+N+dVcCrT8RMOfUMmfJQPqTuU28D5A@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    /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).