News for hackers. Stuff that matters.
Re:Popularizing Haskell through easy web deployment by RyanZAG on Saturday December 07, 2013 @05:30AM (#6866091)
I get the desire, but you'll never be able to popularize Haskell because the only people who want to use it are math majors, and most web devs are not math majors.

If you want to popularize Haskell you'll need to rework the syntax at the very least.

Re:Popularizing Haskell through easy web deployment by codygman on Saturday December 07, 2013 @05:48AM (#6866116)
> the only people who want to use it are math majors

Edit: This is FUD and I kind of feel offended by it, though I'm not sure that is rational

I'm not a math major. I am a web dev. I want to use Haskell (and am using in a smaller capacity) because it means I have to be up late fixing things less. It means that I can worry about my sites getting hacked less because of the strong static typing guarantees which protect me against csrf.

On top of all that type annotations are great for documenting things. On top of that, composing functions and monads can allow you to do things much safer and much more quickly.

There are many teaching resources which show how some of Haskell's perceived cons can be pros such as these:

http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way...

http://book.realworldhaskell.org/

http://learnyouahaskell.com/

http://adit.io/posts/2013-04-17-functors,_applicatives,_and_... (with web dev applicable example) http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_H...

Honestly from my experiences in #haskell on freenode, /r/haskell, and Haskell related content on the web it seems like many more people are using it with the intent to make "real world software".

I haven't gotten the ivory tower vibe from anyone in the Haskell community yet. Quite the opposite actually, everyone seems very pragmatic.

Re:Popularizing Haskell through easy web deployment by PeterisP on Saturday December 07, 2013 @01:27PM (#6867118)
The syntax for "record types" - elements of named tuples - is really awkward and pollute namespace.

I.e., if I want a module in my app to have two different types containing an element 'customerID' that I'd like to refer by name in that context, then it's a bit painful - and it is a really common need if I need to quickly make a mostly-CRUD webapp, for which otherwise Haskell/Yesod would be as practical as Ruby/Rails.

Re:Popularizing Haskell through easy web deployment by Fixnum on Saturday December 07, 2013 @01:38PM (#6867145)
Re:Popularizing Haskell through easy web deployment by carterschonwald on Saturday December 07, 2013 @01:36PM (#6867139)
There are a few different solutions to the record name space problem that are due to land in the next year. And already some decent lens based solutions too.
Re:Popularizing Haskell through easy web deployment by pekk on Saturday December 07, 2013 @02:58PM (#6867454)
Most frameworks protect you against CSRF, that is not unique to Haskell. Other languages also allow you to check your work using tests and static checks.
Re:Popularizing Haskell through easy web deployment by codygman on Saturday December 07, 2013 @07:23PM (#6868369)
I would argue that it isn't quite the same, since with Haskell you can enforce it with the type system. While other frameworks are great pieces of engineering and usually well tested, Haskell is nothing without it's type system therefore tons of work is put towards ensuring that what the type system says is true, is true.

The other thing is I believe frameworks like Yesod use property based testing which IME catches a lot more than unit tests by themselves.

I feel like my point is unclear here, perhaps someone more experienced with Haskell and/or Yesod can articulate it better than I can.

Re:Popularizing Haskell through easy web deployment by nnq on Saturday December 07, 2013 @06:57AM (#6866206)
The syntax is not the problem for Haskell gaining acceptance for web dev.

Most web devs are frightened by functional programming idioms and will run away screaming when exposed to monads.

But the biggest problem imho is the type system that while great, makes things like making simple structs / named tupples or whatever you want to call them annoying and the lack of any "nice" way to just do OOP in it - and no, saying OOP is a bad idea and pretending it doesn't exist doesn't work.

Scala is a good Haskell for web dev. But it's too complex and has no chance of broad adoption against Node/Javascript, Ruby, Python and even PHP frameworks because for 90% of devs it simply doesn't bring anything good enough to make it worth putting up with the complexities stemming from the unholy OOP+FP mix.

Re:Popularizing Haskell through easy web deployment by the_af on Saturday December 07, 2013 @04:34PM (#6867786)
I'm a Java dev in my day job, and I have to say that as a beginner in both Haskell and Scala, I surprisingly find Scala far more difficult than Haskell.

Scala's type signatures are even harder than Haskell's (or at least, mixing FP with OOP makes them harder for me) but you don't get the same guarantees about side-effects and the type inference doesn't work as well. And implicits scare me.

Scala's OOP may be good or bad, but it certainly adds an additional layer of complexity, and one you can't ignore when reading or using someone else's code.

[deleted]
Re:Popularizing Haskell through easy web deployment by klrr on Saturday December 07, 2013 @09:32AM (#6866437)
Sorry, actually thought you were trolling when you first said only math major use it and then made it sound like the syntax was the reason for.

The core points in your criticism is known though, and basically apply to any other language. Most language with new concepts and new syntax will be difficult to learn if you already are used to another language. Especially if the language is almost the opposite of the one you learn. Imperative language are about writing how and writing functionally is about writing what. Widely different mindset is needed to accomplish many tasks. Recursion being one thing, monadic computation being another. One thing many people coming from OOP to Haskell have a hard time with is that they write new classes when what they really want is new datatypes.

In the end you win when you've learnt a language such as Haskell though, cause even if you won't write production code in it you will learn a lot of useful practices you can apply to everyday programming. Also you will have a new language to write your side projects in. ;)

Re:Popularizing Haskell through easy web deployment by kazagistar on Sunday December 08, 2013 @06:36AM (#6869518)
> In the end you win when you've learnt a language such as Haskell though, cause even if you won't write production code in it you will learn a lot of useful practices you can apply to everyday programming.

This is why I hopefully trudge on, even though the further I get into haskell, the more hope I lose of this being true.

Re:Popularizing Haskell through easy web deployment by miloshadzic on Saturday December 07, 2013 @09:39AM (#6866451)
Consider that what is realism for you is just FUD for someone even moderately into the language.
Re:Popularizing Haskell through easy web deployment by coolsunglasses on Saturday December 07, 2013 @05:38AM (#6866104)
The syntax isn't the primary difficulty for a beginner by any means.
Re:Popularizing Haskell through easy web deployment by Mikeb85 on Saturday December 07, 2013 @12:43PM (#6866981)
Please, if you've ever taken even an introductory college math course you'll understand Haskell's syntax. Heck, it's not that hard to reason about even if you haven't...
Re:Popularizing Haskell through easy web deployment by klrr on Saturday December 07, 2013 @06:59AM (#6866210)
Clearly a troll, down-vote and move along.