I find this a bit silly. Only using the type signatures of functions to build your application is a bit irresponsible because you are purposely ignoring the function’s implementation and its implications. Maybe the function uses the wrong kind of algorithm, maybe it’s really inefficient, maybe it doesn’t actually do what you think it does.
Also, in Haskell your function’s implementation can use functions that aren’t passed as arguments. You can really run into some nasty situations that way.
I also watched puffnfresh’s video, much of the same.
How does the code get inserted into the running application? Surely, this can’t work for a large number of domains of applications.
In the video, I think the REPL is an Emacs buffer backed by some extension that hooks up to a Clojure nrepl instance. When he saves the file, the webserver process reloads it without restarting. But you are right that this style of development requires the language runtime to support hot-code loading. Clojure and several other LISPs have this facility, as does Erlang.
A while back, this video was instrumental in my grokking monads in Haskell. People usually make you believe that they are something very hard to understand. They are in fact fun and not that hard. I really like about Haskell is how all IO operations are confined to the IO monad. That concept alone changed the way I think about programming.
Nice article. I guess I was waiting to hear the result though - did you end up using Haskell/Purescript? From the sounds of it maybe not?
It’s a conundrum I’ve wrestled with recently. Where I currently work we have a few components I believe would suit Haskell particularly well, and as a relatively green fanboy of the language, I would relish the chance to get some real production use out of it.
Not only that but I’ve discussed it with my immediate superior and he would be open to persuasion. However, as a pragmatic lead developer, I haven’t been brave enough to fully push for it. I know I am nowhere near expert-level and would struggle to teach a full team on it. We could learn together (good smart team of senior developers) but there’s an obvious trade off in productivity for some unknown period of time, and it would require a reasonable amount of enthusiasm from everyone to dive in.
My current plan is to continue working through @bitemyapp ’s book (http://haskellbook.com/) to see if that eases some of the learning pain, and find a suitable chunk to bite off and suggest for work.
I guess I don’t have much of a point to make here, just that this resonated with me.
The goal with the book is to get people to a place where they can do practical projects (not the only goal, but a big one).
My recommendation is to start making toy projects after the book and try to get some breathing room at work where you’re allowed to get stuck on an prototype. Mistake I see people make is to do something high stakes just as they’re getting comfortable. Most common mistake is not asking for help, so please do ask for help! If you’re comfortable with IRC, #haskell and #haskell-beginners have friendly souls, otherwise, my email is on my Github. I may not have time to address your problem in detail but I should be able to get you pointed in the right direction.
Hope you’re enjoying the book :)
Thanks for the advice - I only hope I can find that breathing room ;)
I will certainly reach out on IRC or to you when I hit any stumbling blocks. I’m really enjoying the book currently, just wish I had more time to dedicate to getting through it. Having messed around with Haskell for a while, some of the challenge is making myself work through everything, even the parts I think I know - just to make sure I don’t miss some key intuition or lesson to be extracted. Great work though, and thank you for the book.
I’m not going to stop learning Haskell because it is hard. I’m definitely thinking about where Haskell might fit in our infrastructure: we have tons of Python and some Clojure. I seem to think that Haskell is quite well-suited for small services (ie the opposite of Rails or Django).
So the answer is yes, we’re open to the idea of Haskell but maybe not just yet.
I’m glad to see that this post has resonated with so many people.