Hacker News new | comments | show | ask | jobs | submit login

The question was why should one have to learn some sophisticated, over-engineered type system along with unreadable notation, when the result will be plain, sequential machine code anyway? What is the point besides "I'm so clever"?

Your claim that it is over-engineered is unsubstantiated, and from a Haskell user's point of view, plainly false.

The claim that the notation is unreadable is similar.

Haskell's notation is certainly unfamiliar, and that can be frustrating (as all unfamiliar notations are), but it is one of the best designed ones out there.

As for the question: Why learn the type system? Because it helps you encode your program's invariants as types -- allowing them to be verified cheaply and repeatedly by an automated prover (the type checker), rather than being documented and checked by expensive tests.

They are also documentation you can rely on, as it is guaranteed to stay in sync with the program. It means you can get up to speed with other's code much quicker.

They also restrict code in useful ways, encouraging code that is more concurrency-friendly, simpler, and generally better.

OK, those are arguments in favor of strong-typing, early-binding and compile-time checks. Java arguments, in other words.

I think, looking at sources of arc.arc or news.arc, that it is, how to say, over-hyped.

Strong typing is not nearly as good when the type system is weaker.

Java's "strong typing" doesn't protect you from null dereference errors, as one example out of many.

Also, strong typing is not as good when you have to specify a lot of the types repeatedly. Without good type inference, it loses a lot of the appeal.

Strong typing is not nearly as good when every function has arbitrary effects not specified by its type.

Strong typing is not as good when it is harder to do parametericity, as discouraging it means you get monomorphic types, which are far less effective at preventing errors.

Haskell gives a whole lot more benefits via static types than Java does.

I'm not clever enough to write that "plain, sequential machine code" in a sufficiently correct fashion.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact