Questions tagged [language-interoperability]

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.

193 questions
1
vote
1 answer

Is it possible to call a C function from OCaml passing a huge array efficiently?

I'm considering the use of a combination between OCaml and C code in a new application. It seems that calling C code from Ocaml is simple: external name : type = C-function-name However, it seems also that in the other way around (calling OCaml…
alvatar
  • 3,340
  • 6
  • 38
  • 50
1
vote
2 answers

Is there any framework to have Java and Php interoperability?

I have a few modules of an application that have been written in Java. But now, I have been asked to write all the other modules in PHP. Is there any tool that will permit me to make method calls from PHP to Java and vice versa? If not, is it…
Lavanya Mohan
  • 1,496
  • 7
  • 28
  • 39
1
vote
0 answers

Receive array from JavaScript in Go

I'm trying to receive an array from JavaScript in my Go code func knapsackWrapper() js.Func { knapsackFunc := js.FuncOf(func(this js.Value, args []js.Value) any { capacity := args[0].Int() weights := args[1].Get("Uint8Array") …
Rodrigo
  • 135
  • 4
  • 45
  • 107
1
vote
1 answer

C# - F# interoperability, how to get result instead of FSharpFunc

I'm learning F# and would like to write simple F# library which can be consumed from C# application. It works as expected for trivial F# functions e.g. let Square x = x * x From C# I can consume it and get the expected value: var sqaredNumber =…
tommyk
  • 3,187
  • 7
  • 39
  • 61
1
vote
1 answer

Interoperability issue with COM events in Python and a COM object created in .NET Core 6.0

I am currently trying to create a COM object that is made in C# in .NET Core 6.0. The COM object itself works as intended. The issue that I am having is related to the custom events that the COM object contains. I have tested Excel as a client and…
Spikxz
  • 35
  • 5
1
vote
1 answer

Deploying .net DLLs for use by ColdFusion?

My company currently runs a .net/sharepoint intranet and a ColdFusion public website. There is a lot of duplicated functionality and clumsy web service layers used to support the two platforms. Recently we have been exploring using .net classes in…
Nick Van Brunt
  • 15,244
  • 11
  • 66
  • 92
1
vote
1 answer

Groovy: How to define a java callable with parameters and make it available to groovy shell?

I would like to implement a Groovy interface that takes parameters and returns a result in java and make it available in GroovyShell. However Callable, GroovyCallacble do not take any parameters so they are wrong for my purposes. Any tips would be…
mP.
  • 18,002
  • 10
  • 71
  • 105
1
vote
1 answer

swift build errors from Objective-C app due to import of Objective-C static library that contains a .swift file

I'm importing an ObjC static lib into my ObjC app but get 95 swift-related build errors. The ObjC static lib builds ok and contains .m .h and .swift source files. Swift file imports CoreBluetooth. CONTENTS BELOW... build errors source code text zip…
Doug Null
  • 7,989
  • 15
  • 69
  • 148
1
vote
1 answer

C#/F# interoperability: cannot use C# types in F# code

I have a Visual Studio solution with 3 projects named BaseCs, UseCs and UseFs (all .net core 3.1 libraries). BaseCs is in C# and has only one source file Definitions.cs containing a series of type definitions UseCs is in C# has only one source file…
Franco Tiveron
  • 2,364
  • 18
  • 34
1
vote
1 answer

Thread safe c# service using fortran dll

I have a c# windows service that starts a couple of threads and then each thread executes the same fortran function from a static dll library compiled with intel fortran 9. When that happen, the first function keeps running just fine, while the…
1
vote
1 answer

Subclassing an Objective C class using Swift in a framework target

I have a framework target in which most of the classes are written in Objective C. Recently we have started introducing Swift files in the code. We make private Objective C files available to swift code using modules(more on this can be found…
Sagar D
  • 2,588
  • 1
  • 18
  • 31
1
vote
0 answers

How to call Scala implicit class method from Java class

I'm a beginner programmer working within a mixed Java/Scala codebase. I have a implicit class in Scala that provides extensions to a class within a third-party dependency. The implicit class is as so: object ThirdPartyClassOps { implicit class…
1
vote
1 answer

Mutable C String in Swift

I’m writing Swift code that interfaces with a C library. The library exposes an incomplete struct, which I’m wrapping in a Swift class. The initializer function for this struct takes a char* argument, or UnsafeMutablePointer in Swift. The…
Ryan
  • 1,053
  • 12
  • 21
1
vote
1 answer

Is there a Swift attribute, such as @nonobjc designed for protocols?

I want to write a PAT and I don't care about Obj-C interoperability. The @nonobjc attribute sounds perfect but its designed for variables and methods only. Anything similar for hiding protocols from Obj-C?
Bowdus
  • 33
  • 3
1
vote
1 answer

Nullability when converting generic Java callback to Kotlin

I'm trying to write a Kotlin wrapper on Spring's TransactionTemplate. The crucial code looks like this: import org.springframework.stereotype.Component import org.springframework.transaction.PlatformTransactionManager import…
Mateusz Stefek
  • 3,478
  • 2
  • 23
  • 28