https://github.com/frege/frege
https://github.com/Frege/frege/wiki/Differences-between-Frege-and-Haskell
- imports are nicer
import Foo as Foo (Foo)
in particular
- differences in prelude are annoying
- also syntactic differences get annoying when porting code
- every module has to start with
module Foo where
- no
deriving
stuff, instead separatederive Class Record
statements
- every module has to start with
- standard library is mostly all there
- lack of
read
is killer- also
floor
andceiling
- these are in
Prelude.Math
- these are in
- also
- basically no libraries
- couldn't figure out how to find documentation for standard library
- found it! http://www.frege-lang.org/doc/frege/Prelude.html
- my bad, this was at the bottom of the readme https://github.com/Frege/frege/blob/f8f3656/README.md#api-docs
- no website, package site, documentation site, or build tool
- website exists, but redirects to github
- works fine with lein (and maven and ant, but i haven't tested those)
- basically "no hackage"
- records are way better
- namespaced, so can have multiple per module
- easy to read, write, and update
- no lenses required!
- string escape sequences are different
"\ESC"
->"\u001b"
- string isn't
[Char]
, which gets annoying- feels like
String
should really beText
- especially considering
packed
/unpacked
- feels like
- distributing an uberjar is nice
- but so is distributing an executable
- hard to tell if build times are bad, considering JVM startup time
- java interop is probably about as nice as it could be
- still a pain in the butt
- everything ends up in the io (really st) monad because mutation
- basically useless for anything you'd normally want to do
- https://gist.github.com/tfausak/c7c88bcc08006a1190ca
- repl is a separate project entirely
- that being said, fx repl is pretty cool
- doc comments part of grammar
---
and{--
- booleans are lowercase
- multi-arg lambas are more annoying
\x \y -> (x, y)
- understandable, since that's really a shortcut for
\x -> \y -> (x, y)
@
behaves differentlyf x@(y:ys)
is nowf (x@(y:ys))
- public vs private is handled with
private
modifier instead of export list- i like this
- i don't like how you have to mark both the type and implementation as private
private f :: a -> b; private f x = ...
If you allow, a few observations from my side.
I'd add .. "unless the ones you get for Java - but those are subject to native declaration."
(and QuickCheck comes bundled)
There is (lein, maven, gradle, IDE) support for building and dependency management builds
on the Java strategy for this, which is hugely successful (much more so than hackage, cabal, stack, etc.)
yes, this tipped me off as well in the beginning, but having the Java String type is huge for integration. Also, there rarely is a need to pack/unpack since your can do things like
head "Hello"
.it is "a bit" of a pain, I agree, but nevertheless the compelling advantage of Frege since it keeps the language clean. The pain comes from exposing the messiness of most Java APIs. When the doctor tells you that you are ill, it is not the doctor's fault that you are ill.
thanks :-)
are even cooler, since you see them immediately in the REPLs and in the IDE Plugin when you ask for the type (without explicitly invoking the doc tool)
Thanks for the thorough analysis!