简体   繁体   English

编程语言的组合如何工作?

[英]How does the combining of programming languages work?

Firstly I'm really sorry to ask this, but I ran out of searchword ideas. 首先,我真的很抱歉问这个问题,但是我没有搜索词的想法。 I'm really curious about how big projects can use different programming languages in the same program. 我真的很好奇大型项目可以在同一程序中使用不同的编程语言。 For example League of Legends uses the following languages: 例如,英雄联盟使用以下语言:

C++ (the core game is written in this) 
Lua (core game) C# (game tools)
ActionScript (game hud and pvp.net) 
Java (platform servers) 
Erlang (platform servers) 
Php/sql (web team / platform)

How can I achieve to make different programming languages work together? 如何实现使不同的编程语言协同工作? (like C++ and C#) Why is it good to do it? (例如C ++和C#)为什么这样做很好? Does it make things easier? 它使事情变得容易吗? I'm open to everything about this. 我对此持开放态度。

Each language lends itself to a certain class of tasks. 每种语言都适合执行某类任务。 For example, PHP has many features geared toward web-server tasks, while ActionScript would not be useful in such an environment. 例如,PHP具有许多针对Web服务器任务的功能,而ActionScript在这种环境中将无用。 You can see this in your breakdown, how each language is closely related to the tasks assigned to it. 您可以在细目分类中看到每种语言与分配给它的任务如何紧密相关。

So it is good to use multiple languages if your goals call for the use of multiple languages. 因此,如果您的目标要求使用多种语言,则最好使用多种语言。 As for making the different languages work together, that is a very large and technical question. 至于使不同的语言协同工作,这是一个非常大的技术问题。 You will find that each language has its own ways of interfacing with other languages, and there are often many technical details that must be learned. 您会发现每种语言都有与其他语言交互的方式,并且通常必须学习许多技术细节。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM