Perl - when I first met it - was great because it handled text easily and 'naturally'. I now use perl for everything, even when another language would probably be better.

Perl6 has gone a long way to making things more universal by using UNICODE, (The difficulties of non-Latin fonts and coding are horrendous).

Mark and chromatic are right that an ability to manipulate multiple languages "naturally" and "in core" would be something no other programming language does.

Perl6 seems to handle most of the necessary things, but not all - I think. Hence Larry's original question.

There are - it seems to me - several different aspects to consider. My breakdown would be:

a) having the language constructs that make text interpolation easy - that is the *text* morphs itself to adjust to the context brought in by the interpolated data. What is necessary is not a plurals fix for English, but a mechanism for fixing that can be applied to other languages. (Here I think perl6 grammars will help, but I am not sure, and without proof of concept actually doubt the facility exists in perl).

b) Translating the perl core itself - the use of other languages to write code in. Given perl6 grammar, and given that any programming language is a rigidly circumscribed subset of words, I think this is entirely possible in most natural languages. Clearly for the compiler to work, an non-English coding language must uniquely map to and from an equivalent English coding.

c) Having the mechanisms in perl6 core not just to interpolate text contextually, but also for different texts to be used with the same interpolations (when a text is translated, different sentence structures result). As Mark pointed out, this can be accomplished with Templates.

d) Ensuring that different information streams can each be directed through templates. As Mark pointed out, more is needed than standard input, output, and errors. Moreover, it would be fantastic if the output from the perl6 compiler could be constructed so that its information streams (warnings, errors, etc) could be attached to translation filters.

I think item (a) is not quite there in perl6. But I really want to use perl6 and I hope this line of development does not derail the fantastic amount of momentum we have seen in recent months.


Mark Overmeer wrote:
* Larry Wall ([EMAIL PROTECTED]) [080126 16:58]:
Last night I got a message entitled: "yum: 1 Updates Available".
After a recent exchange on PerlMonks about join, I've been thinking
about the problem of pluralization in interpolated strings, where we
get things like:

    say "Received $m message{ 1==$m ?? '' !! 's' }."

Any other cute ideas?

I totally agree with many responses, that special support for the English
language is not preferred, certainly when it bothers developers for
other natural languages.  Imagin that you wrote your code this way for
<snip>
To syslog in English (what I understand), and to the website in Chinese
(what I do not understand) Of course, there are quite some more features
in the module.
<snip>
Concluding:
 - hopefully, there is a way to simplify the work for all of us who do
   need to support many languages within one application
 - create one standard, so all CPAN modules integrate in the same way
 - let's try to get Perl to handle languages!

Reply via email to