开发者

Is there non-english syntax of c++

I heard that there is a non-english syn开发者_运维问答tax of c++, it seems to be as c++ style but with translated terms!

can we find a lang like this!


#define пока while
#define типа virtual
#define дай new
#define нах delete
...
#define бюст boost


I guess that you might be able to pull something like that with a preprocessor, but I would greatly advice against this approach. Programming languages are not English or Spanish or any other natural language, but rather a set of keywords with precise meanings in that language.

If you decide to translate the language, you would end up with a situation where either the compiler errors are completely alien to your code (if the language is pre translated before passing to the compiler) or in the best case with compiler support and error messages that you cannot use to ask for help in forums like StackOverflow.

This second approach has been taken in some cases (VBA, as the first example that comes to mind), and the result is a language that is still not natural to the native speakers and for which the available information is fragmented into the different languages. As a matter of fact, that already happens with current C++ compilers... I have disabled localization of the compiler for a long time on that grounds.


Sí; it lets you write code with Spanish keywords and then translate it into C++ or Python.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜