[Haskell-cafe] Most used functions in hackage

Richard O'Keefe ok at cs.otago.ac.nz
Sun Feb 3 22:58:16 CET 2013


On 2/02/2013, at 7:05 AM, Rustom Mody wrote:

> Instead lets make a map (functor?) from learning the programming language Haskell to learning the natural language English.
> So I dont know English (and yeah there are Godelian anomalies in that statement) and I gather that vocabulary is a key to mastering the language.
> Now Webster is a bit too fat to cram up as a whole so I decide to isolate the 5000 most used English words. 
> Do you think my English mastery will be improved that way?

*Stopping* there will not let you master English,
but *beginning* with a core of high frequency words
is a good idea for bootstrapping.

"Basic English" had 700 words.
"Globish" has 1500 words.
The Longman Dictionary of Contemporary English uses a
controlled core of about 2200 words in all definitions.

> Surely Webster had a bigger vocabulary than Shakespeare.

Many people called Webster have written.
Assuming you mean the lexicographer,
just because someone is able to put a word into a dictionary
does not mean that it is part of their active vocabulary.
(Vide Johnson's famous "Ignorance, madam, pure ignorance.")
Shakespeare's active vocabulary was on the close order of
20,000 terms.  (This actually seems to be a typical size for
pre-literate natural language entire vocabularies.)  It
would be surprising if _in his other writings_ Webster's
active vocabulary were noticeably larger than Shakespeare's.
> 
> IOW mastering the paradigm is more important than the details.

False dichotomy.  Haskell (and English) being Haskell (and
English), you _can't_ learn a significant chunk of the
library (high-frequency vocabulary) without learning something
about the way things are put together.

You can learn the English word 'vomer' without learning
anything important about English, but learn what 'although'
means AND HOW IT IS USED and you have learned quite a bit.

In the same way, you can't really learn 'liftM' without
learning quite a lot about Haskell.

> I have a couple of pages on my blog:
> http://blog.languager.org/2012/10/functional-programming-lost-booty.html
> gives a few of the basics that FPers should know (IMHO) before going to advanced stuff. I should mention that it was written it because Haskell is becoming increasingly hard for beginners with the focus on 'type-magic' is overshadowing the basics. [In any case after 25 years of teaching, I am finding it harder and harder to teach] If you have crossed over the basic stage it may not be much use to you :-)

Not just beginners, either.

There _is_ a problem with the idea of trawling the top N functions
from Hackage.  That is that the code written for Hackage is, by and
large, written to be used rather than understood by beginners.  These
are not necessarily the top N functions that it is useful for a
beginner to use or know.  It's probably better to pick one module at
a time that provides a service you really intend to use and learn
what you can from that.  (Like learning how to read one complete
story.)




More information about the Haskell-Cafe mailing list