9 ms·
"Frege is thought as a substitute for this missing GHC port. While not derived from any existing Haskell implementation, it is more or less equivalent to Haskel
by reirob 13y ago
"Frege is thought as a substitute for this missing GHC port. While not derived from any existing Haskell implementation, it is more or less equivalent to Haskell 2010. Please see the wiki page that details the differences."
So now Haskell can produce native executable code, run in a JVM and as subset of it (https://github.com/faylang/fay/wiki https://github.com/faylang/fay/wiki) run in the browser. Now there is no excuse for me to NOT using Haskell ;)
Thanks for bringing Haskell to the JVM!
- cordite 13y agoIf you look at the differences page, it is equivalent in power, but does not have the same expression. Pragmas now sorta start with @, and type classes are (in my opinion) kinda funky coming from Haskell.
- cgh 13y agoAnother difference not mentioned is given the use of recursion in Haskell and the JVM's lack of tail-call optimisation, I have to wonder how dangerous this is. I know Clojure has recur (I'm not a Clojure programmer) but unless Frege has something similar, I predict many an exploding stack.
- cgag 13y agohttp://stackoverflow.com/questions/10008673/does-frege-perform-tail-call-optimization http://stackoverflow.com/questions/10008673/does-frege-perfo...
- dustingetz 13y agoIt can compile to a loop. JVM can't optimize it for free at runtime. Scala has tail recursion elimination
- anonymoushn 13y agoPlease, scalac performs TCO in fewer cases than g++. Some JVMs are able to perform TCO, which is nice since scalac won't do it.
- bunderbunder 13y agoWhat about tail calls for mutually recursive functions? My understanding is that Scala is not able to do tail call elimination in this situation. So the only situation where you can be sure that deep recursion won't overflow the stack is when a function is tail calling itself. If Frege isn't able to do any better with mutual recursion then that might be a severe limitation on its utility. Scala users can work around the issue by writing loops manually. In a pure language, not so much.
- bjourne 13y agoA large part of why I like Haskell is the ghc-specific extensions. TemplateHaskell, OverloadedStrings, DeriveGeneric etc.. Standard Haskell is (imho) much more cumbersome without them.