Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> In haskell the application has to be an elegant diamond or the thing won't even compile!

Nonsense - You only have to make things as hard/elegant as you want them to be (and fore sure, some people do play that game for better/worse).

But, Haskell will happily allow you throw everything in to IO; you can side-step creating a perfect model and just hack together a list of imperative IO statements.

(unless you're referring to the difference between a dynlang and a static lang; that's a difference of another category altogether)



If you are going to "throw everything in IO" then what advantage does Haskell have?


Even "just IO" in Haskell enjoys some very nice typing properties and is often easier to write and ensure proper operation than similar "just IO" programs in other languages.

It's actually super pleasant!


You can refactor it later, of course.

It's even possible to opt out of static type checking if you want.

GHCi also provides a REPL that makes exploratory programming easy.


yes, there is a difference between "'hack' together a program" and doing proper domain modeling.

However, neither should prevent the other. (i.e. "you can do X" should not be confused with "always do X"). Haskell allows you to choose.

Indeed, proper domain modeling is preferred.. but it's nice to have to ability to make that choice yourself based on your own constraints.

Additionally, Haskell makes it very easy/pleasant to refactor from the former to the latter. (On that note, imho the best models (in business) are arrived at iteratively rather than big-design-up-front)


Lazyness, generic programming, algebraic datatypes, inferred typing




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: