4 ms·
> Nah, Coq, Agda, Idris and any dependently typed language have Haskell beat I just knew someone was going to correct me on that statement, hence my "mainstrea
by adambard 13y ago
> Nah, Coq, Agda, Idris and any dependently typed language have Haskell beat
I just knew someone was going to correct me on that statement, hence my "mainstream-ish" qualification.
> why draw that comparison when competing with Haskell is not the intention of the library?
I've got an unhealthy obsession with syntax, and I wanted to have a reference for people to see how things look in a "real" typed language. But, while I'm here, here's a bit I just wrote on /r/haskell (someone put this link there, but of course the haskellers were unimpressed) in defense of the library:
---
Developing in Clojure tends to be a bit of an organic process, thanks to the deep REPL integration in many tools. You can evaluate arbitrary bits of your code as you go, swap things out, tweak whatever you like, and through a more-or-less exploratory process end up with a working bit of code. It's very freeing and very efficient, but if you've ever used a dynamic language for a large project, you know that this tends to create issues refactoring later unless every component is attached to a unit test. The power of core.typed is to let you, after the fact, lock down those function signatures and create what amounts to an automatic test suite.
- helloTree 13y agoThis is the same for Haskell where it's also convenient to develop in the repl (ghci).
- adambard 13y agoThere's the repl, and then there's nREPL. I do like ghci, but I can't execute arbitrary chunks of Haskell directly from Vim.
- freyrs3 13y agoThis isn't a function of ghci or Haskell, that's an editor feature. If you want that kind of functionality than emacs is probably your best bet. Though you can send arbitrary code blocks from vim using vim-slime. [1] https://github.com/jpalardy/vim-slime https://github.com/jpalardy/vim-slime
- tel 13y agoThough you can't execute arbitrary blocks of text in Haskell. Almost everything non-trivial will require adding a slew of "let"s, not all statements are available in GHCi, and state gets wiped on every reload. When I first began developing Haskell, coming from Clojure, these issues drove me crazy. Nowadays I don't miss them too much and doubt that they're really such good features to begin with... But it's decidedly false to claim that GHCi is as flexible as Clojure's repl. Nowadays, Clojure's repl would make me anxious. It reminds me a bit of people doing live code edits on a production server. You can't ever be quite sure what you get.