[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua in other spoken languages?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 18 Sep 2015 23:19:59 +0200
2015-09-18 14:20 GMT+02:00 Bertrand Mansion <lua@mamasam.net>:
>
> I was trying to do some Lua programming with my son (in Love2D, a space invader game, he is 7) but I soon realized that the English keywords can make things more complex than necessary for a young French boy (same with other spoken languages).
>
> Do you know if attempts to translate Lua keywords/functions in other languages has been done already ? Or do you think this can be done and how could it be done then ?
I would leave the keywords unchanged, but assign the library functions
to local variables with easy=to-remember names. Many programmers
cache them even in English. E.g. I find it useful to say
local append=table.insert
Also 'require' is not the most natural word for what the function
does, and I have not even started on polysyllabic behemoths
'semetatable'. Nice, short French words (no accent, please)
can only be a bonus.
But for keywords you can argue that they are just meaningless
tokens. (In Algol 60 they were officially just that.) 'for' reminds
me a bit of Basic's 'let': chosen because it is short and the syntax
demands a keyword. In Fortran the same job is done by 'do',
even shorter.
Your son does not need to know what 'for' means in English.
He only needs to know that for ... do ... end are the brackets
for the initialization and body of an iteration. The French
translations of the English words will still be just such brackets.
Apart from `fin` for `end`, they will probably have more letters.