I'm new to Haskell and so far quite enjoying it. One thing that strikes me is that it seems quite large, with many syntactical constructs and libraries that define functions for just about everything. For example, Data.Map defines almost 100 functions. Data.Set also defines many functions, as does Data.List, which also provides alot of the same functionality as Data.Set.
I have my beginner's opinion on why this might be (provide functions for all common patterns, reduce noise), but I'm interested to hear some veteran opinions on the topic.
I would say that the size of the Haskell language is somewhere in the middle (larger than Lisp, smaller than C++). Although since all the syntactic sugar has well defined translations down to Haskell Core (which has about 7 elements), its a bit hard to distinguish between library and language.
Its true that the libraries do contain a lot of small functions, basically because Haskell programmers have found patterns that kept turning up and then put them into code. As a learner I often had the feeling "there ought to be a function to do that" and then discovering that there was. You learn them in the same way as they were written: write the function yourself, and then find it in the documentation for some library a few days later.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With