开发者

Programming in a language other than English

I was having a discussion on twitter about add开发者_运维知识库ing the ability of Ruby to use λ instead of lambda, and more generally about Unicode support. I realized that all the languages I know work only with English reserved words and mostly assume a us-en keyboard (for example using $ instead of £ or ¥). While some languages are now starting to have some support for Unicode in there string functions, there are still so many convention based on English or the Latin style character set. For example Ruby requires class names begin with an upper case letter, but upper and lower case is not a property of glyphs in most scripts.

So the question is: "Are there programming languages that work in a large set of languages, and how do they do it?"


You can have a look ant the APL programming language, for example.


Some languages define very simple syntaxes and little or no keyworks. For example, LISPs and languages that function like them (Tcl, etc...) where everything is "command arg1 ... argn". These languages, since there are no keywords per se, are language agnostic.

For example, in Tcl, you can rename the various commands to use whatever language you want and everything should work perfectly.


Python 3 is completely Unicode-based, so identifiers can be constructed out of any Unicode letters/digits etc.

It's still not a good idea to use characters for function names that programmers from other nations don't have easy access to on their keyboards.


In the 3.0.0 release of the Parrot VM, they added support for a language, Ωη;)XD that is named using unicode which caused all kinds of breakage for the VM. It might be worth taking a look at.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜