0

I want to know how can we interface compilers so that we can mix up many languages together but still the code should work.
One of my thoughts is, if there is any code in C allthose codes must be taken apart and must be compiled by C compiler and if there is any code in Java it must be taken apart and must be compiled separately. The laguages must be able to pass the result between them and output screen must be same for all.
So code like this must work:

#include<stdio.h>
void main()
{
    system.out.println("HAI");
}

It looks crazy but if possible answer it...

Edited by Reverend Jim: Fixed formatting

4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by death_oclock
0

Whilst you can create programs from multiple programming languages, the "interface" tends to be at the DLL or program executable level.

You're not going to be able to mix/match several languages in the same source file.

0

Can anybody tell which language could be useful for this interfacing DLL or executables

0

If you really want to, you could write C libraries that mimic java code, as well as many other languages. It would work best in C++ however, which provides a lot of functionality for class-based designs. Most important here, i would think, is operator overloading.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.