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

I find myself wondering if this is getting upvoted by Haskell contrarians who aren't actually reading the article and noticing that it not about Haskell "being too mathematical", but not being out-of-the-box suitable as a really convenient ring theory explorer. I bet a lot of the upvoters would actually consider this a good sign rather than a bad one, on average....

There's still some room for Haskell syntax improvements. I've found the recent OverloadedStrings to be a big step forward, allowing you to directly use strings in places where it actually wants another type, removing a ton of useless and hard-to-factor-out code converting strings to ByteStrings, Text, and various other types that are there simply to label Strings as something more specific.

As dfrankes says, it is known the Prelude isn't perfect, but I'm not sure there's actually a perfect formulation regardless of what you do. Even if you could get all the mathematicians to agree completely about what all relevant mathematical entities are, something that is a lot harder than it sounds because it turns out a lot of them can have arbitrarily-chosen fiddly details when you really get down to it (how many set theories are there again?), you'll never bridge the gulf between a conventional programmer and any mathematician, and I think Haskell's promise as an interesting language lies rather more with the conventional programmer case than making mathematicians happy. (Not because the latter is bad, but because it is a sufficiently hard problem that trying to reconcile the needs of such a beast with something still useful is probably impossible.)



I find myself wondering if this is getting upvoted by Haskell contrarians who aren't actually reading the article and noticing that it not about Haskell "being too mathematical", but not being out-of-the-box suitable as a really convenient ring theory explorer.

I love how you, in the same sentence, managed to put in doubt credibility of the upvoters and downplay the issue in hand.

To answer your question: yes, I actually read the article. Why I upvoted it? Haskell's way of wrapping integer literals with implicit `fromInteger` seems to be a clever hack that alleviates some pain when dealing with basic arithmetics, but I always wondered what kind of unexpected problems it may cause. I got an answer in this article.


"downplay the issue in hand."

No, I don't. The issue is serious. I'm personally a proponent of tossing the current Prelude and replacing it with something more useful. I think the supposed costs are smaller than expected (it's already modular) and the benefits underestimated. I'm not a Haskell booster, I'm an interested skeptic.

I just think an article about a relatively esotoric issue about Haskell got upvoted suspiciously quickly on a holiday weekend. It's not a bad article by any means.


However, you should wonder whether that is also the motivation of most other upvoters. I find the title so appallingly lacking in understanding and respect that I really couldn't care less about the contents when deciding whether to up- or downvote it. I don't doubt the same could hold for many others, only resulting in the reverse action.


`xi`, notice that if you substitute `Float` or `Double` for his `Int` throughout his module, you get the same type error he gets, as you would intuitively expect:

    [1 of 1] Compiling Main      
    Ok, modules loaded: Main.
    *Main> p [1,2,3,4,5]
    <interactive>:1:11:
        Ambiguous type variable `t' in the constraints:
 
If however you substitute `Integer` for `Int`, which is after all what he claims to have meant, then suddenly:

    [1 of 1] Compiling Main              
    Ok, modules loaded: Main.
    *Main> p [1,2,3,4,5]
    (5x^4 + 4x^3 + 3x^2 + 2x + 1)
    *Main> :t it
    it :: UnivariatePolynomial Integer
It seems, then, that if he had known that in Haskell the 'integer' type is called Integer, not Int, he wouldn't have had any difficulty, or any blog post, or any occasion unjustly to malign his teachers `conal` and `mauke`, to whom he ought rather to be grateful.


People don't neceessarily up vote in agreement, it could be so that the story stays near the top long enough to be addressed by a Haskell proponent. For a while there were no replies to this submission.

Besides, now we've all got a good excuse for why we've not learned Haskell yet: the type system is like so broken ;)




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

Search: