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++.
精彩评论