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]
176 questions
424
votes
24 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…
![](../../users/profiles/4639.webp)
Edward Tanguay
- 176,854
- 291
- 683
- 1,015
127
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…
![](../../users/profiles/40002.webp)
Brock Woolf
- 44,051
- 47
- 117
- 143
78
votes
12 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?
![](../../users/profiles/63679.webp)
n00ki3
- 13,009
- 15
- 52
- 65
73
votes
13 answers
Call Python function from MATLAB
I need to call a Python function from MATLAB. how can I do this?
![](../../users/profiles/179234.webp)
Sarah
- 1,131
- 2
- 12
- 17
72
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…
![](../../users/profiles/568289.webp)
richard
- 10,572
- 20
- 83
- 144
39
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…
![](../../users/profiles/25704.webp)
Chris Arguin
- 11,370
- 4
- 30
- 46
31
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…
![](../../users/profiles/5658353.webp)
Nimit Bhardwaj
- 777
- 7
- 19
22
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…
![](../../users/profiles/3609514.webp)
TheTechWolf
- 1,634
- 1
- 15
- 23
21
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
![](../../users/profiles/171546.webp)
Open the way
- 21,703
- 44
- 131
- 190
15
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…
![](../../users/profiles/6311202.webp)
Miguel Guerreiro
- 316
- 2
- 11
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…
![](../../users/profiles/64679.webp)
George
- 3,323
- 4
- 25
- 24
13
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?
![](../../users/profiles/90088.webp)
Bartosz Milewski
- 9,181
- 4
- 34
- 45
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,…
![](../../users/profiles/561309.webp)
laurent
- 79,308
- 64
- 256
- 389
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…
![](../../users/profiles/1035792.webp)
gsscoder
- 2,314
- 3
- 23
- 34
12
votes
3 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…
![](../../users/profiles/4717652.webp)
Richard West
- 148
- 2
- 6