English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Correct way of programming a CGI script
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-09 (17:32)
From: Loup Vaillant <loup.vaillant@g...>
Subject: Re: [Caml-list] Re: Rope is the new string
2007/10/9, Vincent Hanquez <tab@snarc.org>:
> By my question i wasn't suggesting that everybody should do
> internationalization by hand.

Sorry, I misinterpreted you.

> definitely we also need some UTFstring type library (which can use rope,
> string, whatever internally), with all common type of operations
> (appending, finding, ...), but it's a just a specific sub case and also
> a different type not compatible with strings (in OCaml terminology).

Then, we should have both byte arrays (the native Ocaml strings), and
unicode strings. We will also need proper syntactic sugar for unicode
strings. Operators, and literal values (like #"example"). Only then,
ropes could feel like native strings --and be useful as such.

> [...] it's a just a specific sub case [...]

Internationalization is, mere text crunching is not. (You meant that,
right?) With properly interfaced unicode strings, I can do my text
crunching without worrying about internationalization, and with no
programming overhead. Then, when (if) I have to internationalize, it
is much easier.

About the incompatibility, the two types of strings are incompatible
anyway. Maybe even more than ints and floats. Sure you once tried some
"Obj.magic" conversions of an non-English text with emacs. :-)

Loup Vaillant