On Sat, Oct 10, 2009 at 5:11 PM, Don Stewart <d...@galois.com> wrote: > brad.larsen: >> John, >> >> On Thu, Oct 8, 2009 at 3:20 PM, John A. De Goes <j...@n-brain.net> wrote: >> [...] >> > JVM is cross-platform, and contains sufficient typing information to >> > permit one to write something like, "import foreign jvm >> > java.list.Collection", and have typed access to the whole class and all of >> > its methods. >> [...] >> >> Having painless Haskell <- Java interoperability would be great. I'm >> curious though: could it really be so simple as a one-line ``import >> foreign jvm'' directive? I imagine the purity mismatch between >> Haskell and Java would be very troublesome. > > No more so than C, surely. We're used to stateful APIs. They're a pain. [...]
The use of foreign C libraries in Haskell is typically done through definition of lots of boilerplate code, putting a safe, workable Haskell veneer over the library. Right? I got the impression (perhaps wrongly) that John was suggesting a simple one-line ``import foreign jvm LIBRARY'' directive to let you use LIBRARY without writing all that boilerplate. Which would be very convenient, but is rather different than the situation with C libraries. Sincerely, Brad _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe