From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA20859 for caml-redistribution@pauillac.inria.fr; Fri, 29 Oct 1999 19:11:36 +0200 (MET DST) Resent-Message-Id: <199910291711.TAA20859@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA20296 for ; Fri, 29 Oct 1999 15:14:56 +0200 (MET DST) Received: from enst.enst.fr (enst.enst.fr [137.194.2.16]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id PAA09819 for ; Fri, 29 Oct 1999 15:14:53 +0200 (MET DST) Received: from email.enst.fr (muse.enst.fr [137.194.2.33]) by enst.enst.fr (8.9.1a/8.9.1) with ESMTP id PAA29962 for ; Fri, 29 Oct 1999 15:14:53 +0200 (MET DST) Received: from young.enst.fr (young.enst.fr [137.194.34.13]) by email.enst.fr (8.9.3/8.9.3) with ESMTP id PAA22165 for ; Fri, 29 Oct 1999 15:14:52 +0200 (MET DST) Received: from localhost (debourse@localhost) by young.enst.fr (8.8.8+Sun/8.8.8) with SMTP id PAA08163 for ; Fri, 29 Oct 1999 15:14:51 +0200 (MET DST) Date: Fri, 29 Oct 1999 15:14:51 +0200 (MET DST) From: Benoit de Boursetty Reply-To: Benoit.de-Boursetty@polytechnique.org To: caml-list@inria.fr Subject: Internationalizing the language Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-Transfer-Encoding: QUOTED-PRINTABLE Resent-From: weis@pauillac.inria.fr Resent-Date: Fri, 29 Oct 1999 19:11:36 +0200 Resent-To: caml-redistribution@pauillac.inria.fr =09Hi, =09Thanks to all for your answers. I will reply to some of the interesting points you raised. To demonstrate what I meant, I wrote a quick and dirty parser for a French syntax with camlp4: http://www.stud.enst.fr/~debourse/caml.html * Having identifiers and syntactic keywords in different languages makes you feel the fundamental difference between them without having to colorize them in Emacs. Thus you're more aware of the syntactic structure, and the language is easier to learn. I must agree on that one, Mr Weis! I am just *really* wondering what it's like to program completely in the language you're best at, not being a native English speaker. This remark is void, however, if the pervasive library is used. For instance, "raise" is not a keyword, it is a value defined in the standard library ("true" and "false", on the other hand, are also values but are parsed as keywords). Just to advocate the ability of localizing library interfaces. In a possible solution, there would be an "interface localization" file "cha=EEne.ml?" describing a module Cha=EEne, equal to "String" in functionality, and that would not require re-compilation. * The language of keywords should not change, otherwise it would make international program exchanges difficult. This remark is irrelevant: automatic translation is easy between different syntaxes of the same language. It's just another pretty printing of the abstract syntax tree. * Parser rewriting is difficult I was not really concerned with feasability in the first place. But actually, for French (who, compared to Japanese, resembles English quite a lot I must say), I could modify the parser with camlp4 in about 1 hour ; and I'm no expert in language parsing. I've only had to make one syntactic modification, because "downto" doesn't exist in French (or I don't know the equivalent). Now, the very existence of camlp4 shows that I'm not the only one that wants to be able to choose my brand of syntactic sugar. * There are translations for keywords in French and they are used in practice (sorry if I'm getting too local) For me, "in practice" would mean that I use it in the source code: but at present, "in practice" only means in compilation courses, books and in pseudo-code written at board by teachers. Now, why do they call that "pseudo-code" when, with the power of O'CaML and keywords in the right language, it could be real code? Thanks for the translation of "pattern-matching", too :-) I note that the two persons who gave me the translation are researchers in computer languages. I think this word is quite not often used by end-users. Also, my question was not specially about "matching", but about the phrase "to match an expression with a pattern". Indeed, I'm reading the book by C. Queinnec, and I find out that he makes sentences such as "Le filtrage compare un filtre à une expression...". So, the phrase should translate: "comparer une expression à un motif" ?