caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Benoit de Boursetty <debourse@email.enst.fr>
To: caml-list@inria.fr
Subject: Internationalizing the language
Date: Fri, 29 Oct 1999 15:14:51 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.GSO.4.02.9910291357110.7735-100000@young.enst.fr> (raw)

	Hi,

	Thanks 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îne.ml?" describing a module Chaîne, 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" ?



             reply	other threads:[~1999-10-29 17:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-29 13:14 Benoit de Boursetty [this message]
1999-10-30  0:45 ` Benoit de Boursetty

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=Pine.GSO.4.02.9910291357110.7735-100000@young.enst.fr \
    --to=debourse@email.enst.fr \
    --cc=Benoit.de-Boursetty@polytechnique.org \
    --cc=caml-list@inria.fr \
    /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).