开发者

Using multiple programming languages: what is the point? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and po开发者_C百科ssibly reopened, visit the help center for guidance. Closed 11 years ago.

I have looked this up and I still cannot find any sort of answer to this.

The thing I am referring to is Polyglot programming, which is the use of multiple programming languages to make an application (I think that's a correct definition).

I am just wondering why you would use something like C++ and Java together?

I am aware they have their advantages and disadvantages but what is the actual point and how would these two be put together to work with each other?


Polyglots aren't one application made of multiple languages, they're one source code text which compiles as valid multiple languages, and they pretty much don't have a use.

You use multiple languages for their individual strengths. For example, I might use C# for GUI work and WPF, which is an excellent strength, but I might use C++ to write the core of my application, because that's it's strength. I could write the GUI in C++ but that's not a strong point of C++, and I could write my core algorithms in C# - if I was OK to have little to no control over the application and how it was written and how it executes and let it take much longer to execute.

Using both together means that I can have an application with a sweet-ass extensible GUI written in WPF and C#, and a powerful, performant core written in C++.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜