Scala-Java interoperability: is passing a Java function to Scala as a higher-order function possible?
25 views
Skip to first unread message
Denis Papathanasiou
unread,
Aug 23, 2016, 8:52:57 PM8/23/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scala-user
I have a project with two modules, one in Scala, and the other in Java.
I need the Java module because it makes a call to an internal data store (using home-brewed libraries) that would be difficult to replicate in Scala.
But I prefer the Scala module to handle the concurrency that calls to the data store involve.
So while I cannot make the data store queries directly in Scala (which would have been ideal), I would like a simple way of passing the Java query as a higher-order function to my Scala module.
Is this possible? I do have Java 8 at my disposal for the Java module.
Seth Tisue
unread,
Aug 23, 2016, 9:02:00 PM8/23/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message