4 ms·
The fact that Haskell is always curried means that you always have to be aware of currying. No, you don't. That was my point. By pretending that functions are
by tmhedberg 15y ago
The fact that Haskell is always curried means that you always have to be aware of currying.
No, you don't. That was my point.
By pretending that functions aren't curried, you're limiting yourself to a subset of the language's full expressiveness, but it is a completely consistent subset; it behaves precisely as you would expect it to in the absence of currying. And that subset is equivalent to the expressiveness of Python (or any other language) without currying.
It sounds like you're implying that Haskell is just an odd assortment of academic "cute tricks" for impressing people who have nothing more important to spend their time on, and that any practical programmer would steer clear of it in order to "get things done". Frankly, this is the opinion of someone who has little experience with the language, or with functional programming in general. There are many ideas in Haskell which are unusual, or of seemingly little value to someone with a strictly imperative background. But as anyone who has used the language to build something practical can tell you, these "tricks" are much more than clever mathematical toys; they enable you to express your intent more succintly and with greater precision than with the tools provided by most other languages, with strong compile-time guarantees of correctness to boot. You tend to miss them quite a bit when using languages which lack these features.
Not everyone who uses Haskell falls in love with it, and there are plenty of arguments to be made both for and against the language, but your dismissive characterization is just naive.
- anamax 15y ago> It sounds like you're implying that Haskell is just an odd assortment of academic "cute tricks" for impressing people who have nothing more important to spend their time on, Not at all. It's a very elegant system which attracts folks who really want to think about tools. That's not surprising, since that's what Simon Peyton-Jones (haskell creator) designed it for.
- tmhedberg 15y agoOK, fair enough. Though I'm not quite sure what you mean by "thinking about tools". If you're referring to the language as a tool, I personally haven't found that I spend more time thinking about the language when using Haskell than I do when using C, Python, Java, etc. In fact, many of the abstractions it provides make it easier to just "say what I mean" and not worry so much about the gritty details of the language. If I get something wrong in terms of syntax or types, the compiler will catch it for me. At the opposite end of the spectrum, in C, problematic code often just means "Segmentation fault" gets printed to stderr and I'm left without meaningful feedback about where I screwed up. Anyway, I apologize for misinterpreting your tone.