Re:Thoughts on Designing a new Web Apps Language
by danieldk on Saturday August 20, 2011 @08:43AM
(#2906510)
I use Snap on one small project, it is pretty awesome. Snap applications have the terseness and simplicity of, say Sinatra or Rails, but with type checking. As is often the case in Haskell, if your program compiles it is usually correct.
What I also like about Snap (and Yesod) is that it is integrated well with the enumerator package. Simply said, the enumerator package allows you to implement composable data sources, manipulators, and sinks. Since many web applications consist of extracting data from a source, manipulating, and sending it, it allows you to write applications short and simple.
Re:Thoughts on Designing a new Web Apps Language
by lobster_johnson on Saturday August 20, 2011 @03:29PM
(#2907458)
Looked briefly at Snap, but without something like HAML (http://haml-lang.com/) and SASS (http://sass-lang.com/) it's not something I will use. Not going back to the stone age of writing XML-with-expansions templates ever again.
Re:Thoughts on Designing a new Web Apps Language
by lucianof on Saturday August 20, 2011 @09:33AM
(#2906597)
Thanks for the link, I'll have to check this out some time. For some reason I always find it hard to imagine how I could write a whole app in a functional language. Probably that's because I've never actually done it..
Haskell in general meets a lot (though probably not all) of the author's requirements. Static type inference is great, and Haskell's system makes explicit type declarations completely optional except for in a handful of rare cases, though you will find yourself wanting to use them on most functions anyway because of how they clarify and improve the readability of your code. Testing is also dead simple with tools like QuickCheck--it essentially manufactures test cases for you based on invariants that you specify about your code.