How does this compare performance-wise to natively compiled code?
Frege – a Haskell for the JVM
31–40 of 51 posts
Re: Frege – a Haskell for the JVM
#32Re: Frege – a Haskell for the JVM
#33Re: Frege – a Haskell for the JVM
#34How does this compare performance-wise to natively compiled code?
Generally, >=
Re: Frege – a Haskell for the JVM
#35Are typeclasses possible on the JVM? I'm a .NET person, and I've always heard that typclasses aren't possible on the .NET CLR, so I wonder what's different about the JVM that makes this possible?
Scala has typeclasses. It is not strictly equal to Haskell since it relies on the usage of `implicit`. Plus it doesn't enforce that there is only one typeclass per type in the classpath (I believe I remember that Haskell enforces that I compile time).
I understand the Haskell communities desire for coherent typeclasses, but I still find the newtype work around cludge to allow multiple implementation of, say, Monoid to be quasi hacky. What's worse, you can still fairly easily define multiple instances of the same typeclass accidentally (orphan instances) and the compiler won't catch it.
Re: Frege – a Haskell for the JVM
#36How does this compare performance-wise to natively compiled code?
Generally, >=
Re: Frege – a Haskell for the JVM
#37How does this compare performance-wise to natively compiled code?
In this particular case, Frege is compiling to Java source code (not JVM bytecode), and Java does not give precise control over how things should be done at runtime, such as object representations. Additionally, while the main Java compiler is reasonably mature, its optimizations are certainly tailored for idiomatic Java, which includes a lot of mutation, strict evaluation, and use of object-oriented programming. Haskell in particular has unevaluated expressions everywhere (thunks) because of lazy evaluation, and heavy use of first-class and recursive functions.
Re: Frege – a Haskell for the JVM
#38So then we have Haskell with Clojure.
Re: Frege – a Haskell for the JVM
#39Re: Frege – a Haskell for the JVM
#40Are typeclasses possible on the JVM? I'm a .NET person, and I've always heard that typclasses aren't possible on the .NET CLR, so I wonder what's different about the JVM that makes this possible?