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