Language Interoperability is the ability of code to interact with code that is written using a different programming language. Language Interoperability can help maximize code reuse and, therefore, improve the efficiency of the development process.
Questions tagged [language-interoperability]
193 questions
441
votes
25 answers
How to show loading spinner in jQuery?
In Prototype I can show a "loading..." image with this code:
var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars,
onLoading: showLoad, onComplete: showResponse} );
function showLoad () {
...
}
In jQuery, I can load a server…

Edward Tanguay
- 189,012
- 314
- 712
- 1,047
131
votes
7 answers
Use C++ with Cocoa Instead of Objective-C?
I would like to write applications that use C++ and the Cocoa frameworks because Apple is not making Carbon 64-bit capable. C++ seems to be pretty vanilla in its implementation on Linux and Windows but on Mac OS X it seems like additional Apple…

Brock Woolf
- 46,656
- 50
- 121
- 144
101
votes
13 answers
How do multiple languages interact in one project?
I heard some people program in multiple languages in one project. I can't imagine how the languages interact with each other.
I mean there is no Java method like
myProgram.callCfunction(parameters);
never happens or am I wrong?

n00ki3
- 14,529
- 18
- 56
- 65
83
votes
6 answers
What is marshalling? What is happening when something is "marshalled?"
I know this question has been asked, at least here.
But there wasn't a satisfactory answer, at least not to me. There is a lot of talk about marshalling as regards interoperating with unmanaged code, but what about marshalling from one thread to…

richard
- 12,263
- 23
- 95
- 151
77
votes
13 answers
Call Python function from MATLAB
I need to call a Python function from MATLAB. how can I do this?

Sarah
- 1,361
- 2
- 14
- 20
45
votes
8 answers
What issues can I expect compiling C code with a C++ compiler?
If you take an existing C code base and compile it with a C++ compiler, what sort of issues can you expect to crop up? For example, I think that assigning an integer to an value with an enumerated type will fail in C++, whereas it's legal (if a bit…

Chris Arguin
- 11,850
- 4
- 34
- 50
32
votes
3 answers
Can functions from the C standard library be used in C++?
Right now I'm getting familiar with C and the C standard library and I wonder if my knowledge in this area will be useful when I turn to working with C++ at a later time.
Therefore I'd like to know, whether I can use the functions provided by the C…

Nimit Bhardwaj
- 827
- 9
- 19
29
votes
1 answer
How should I test Kotlin extension functions?
Can somebody tell me how should I unit-test extension functions in Kotlin? Since they are resolved statically should they be tested as static method calls or as non static ? Also since language is fully interoperable with Java, how Java unit test…

TheTechWolf
- 2,084
- 2
- 19
- 24
23
votes
9 answers
Embed bash in python
I am writting a Python script and I am running out of time. I need to do some things that I know pretty well in bash, so I just wonder how can I embed some bash lines into a Python script.
Thanks

Open the way
- 26,225
- 51
- 142
- 196
19
votes
1 answer
"No known class method for selector" when using static Swift method on Objective-c
I have been given Objective C code and I need to add extra functionalities to it. I am very unfamiliar with Objective C so doing the most I possibly could on Swift would be very optimal for me.
This is my Swift file/class:
import Foundation
import…

Miguel Guerreiro
- 356
- 1
- 2
- 11
15
votes
5 answers
Swift & Objective-C project - generated -Swift.h error - Cannot find interface declaration for UIViewController
I've got a project using the Swift generated Bridging Header and have the project set up correctly (no spaces in Names, Uses Modules, pre-declaring Swift classes in my .mm file, Deleting derived data, doing a clean rebuild etc...). The Bridging…

Richard West
- 178
- 2
- 6
14
votes
2 answers
Haskell Java Interoperability
What are current solutions to Haskell/Java interop? I've seen the paper on Lambada by Meijer and Finne. There is a project called GCJNI, but it seems to be defunct -- links to it are broken. Is there something that one could use out of the box?

Bartosz Milewski
- 11,012
- 5
- 36
- 45
14
votes
4 answers
How to convert from from java.util.Map to a Scala Map
A Java API returns a java.util.Map;. I would like to put that into a Map[String,Boolean]
So imagine we have:
var scalaMap : Map[String,Boolean] = Map.empty
val javaMap = new JavaClass().map() // Returns…

George
- 3,433
- 4
- 27
- 25
13
votes
1 answer
Is it possible to call a C++ function from JavaScript in a QWebView?
I have a web page loaded in a QWebView. In there, I would like to have JavaScript call a function of my application. That function would then returns some strings that JavaScript would dynamically display.
Can it be done using QWebView? Basically,…

laurent
- 88,262
- 77
- 290
- 428
13
votes
1 answer
C and Go interoperability issue involving C.free()
I've a Go function that wraps the proc_name(pid,...) function from lib_proc.h.
This is the complete C prototype:
int proc_name(int pid, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
that can be found here…

gsscoder
- 3,088
- 4
- 33
- 49