From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA30394; Fri, 16 Apr 2004 16:32:34 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA30635 for ; Fri, 16 Apr 2004 16:32:31 +0200 (MET DST) Received: from smtp.mbg.ocn.ne.jp (mbg.ocn.ne.jp [210.190.142.181]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3GEWTYM016236 for ; Fri, 16 Apr 2004 16:32:30 +0200 Received: from localhost (p1128-adsau14honb9-acca.tokyo.ocn.ne.jp [61.118.167.128]) by smtp.mbg.ocn.ne.jp (Postfix) with ESMTP id 365656525; Fri, 16 Apr 2004 23:32:28 +0900 (JST) Date: Fri, 16 Apr 2004 23:32:18 +0900 (JST) Message-Id: <20040416.233217.48813959.yoriyuki@mbg.ocn.ne.jp> To: skaller@users.sourceforge.net Cc: caml-list@inria.fr, ocaml-i18n@orcaware.com Subject: Re: [Caml-list] Camomile-0.5.0 From: Yamagata Yoriyuki In-Reply-To: <1082049719.20677.1262.camel@pelican> References: <20040416.012529.21602566.yoriyuki@mbg.ocn.ne.jp> <1082049719.20677.1262.camel@pelican> X-Mailer: Mew version 2.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 yamagata:01 yoriyuki:01 yoriyuki:01 sourceforge:01 caml-list:01 2004:99 locale:01 deficient:01 locale:01 camomile:01 optionally:01 stdlib:01 camomile:01 -bits:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: skaller Subject: Re: [Caml-list] Camomile-0.5.0 Date: 16 Apr 2004 03:22:00 +1000 > I have a question here. The C locale concept does need > a binding, unfortunately. However it is well known > this is a seriously deficient hack, and the use > of C locales should be strongly discouraged. > > C++ uses an imperfect but much better concept: locale's > are independent objects which can be passed as arguments > to locale sensitive operations. Camomile has its own locale, and you can (optionally) pass them to the locale-sensitive functions. On the other hand, the functions in I18N-ed stdlib use C locale *name* to guess the default locale. Another use of C locale is code-conversion for standard IO. Binding of C locale functions in Camomile is minimal, just sufficient to achieve these purpose. This is because C locale has portability problems (wch could be even 8-bits, and may not be unicode, and so on.) and generally weak functionality. Another reason is that I want Camomile strictly follow Unicode Standard, while ISO-C does not. As OCaml on the whole, I think the best strategy would depend on application. Desktop applications would required to be consistent with other C applications, so using OS functions (for example Glib one, or Win API) would be best. For a network application, on the other hand, platform-independence would be desirable. For such a case, Camomile like approach (everything implemented by OCaml) would be better. -- Yamagata Yoriyuki ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners