The thing about learning from examples is that it’s far too easy to learn the wrong thing from them, or nothing at all. When writing examples, one has to spend additional effort on explaining which parts of the example are ‘moving parts’ and which are ‘fixed’, i.e. which elements of the example are inherent to the problem you’re solving, and which are just placeholders you should replace with your own. Many don’t bother; it’s why every Medium ‘tutorial’ basically reduces to ‘here’s a bunch of code you can copy-paste without understanding’.
With a ‘theoretical’ description, like a BNF grammar or a Unix man page listing every possible option the program accepts, this is immediately obvious. Haskell’s focus on ‘theory’ follows the same philosophy.
With a ‘theoretical’ description, like a BNF grammar or a Unix man page listing every possible option the program accepts, this is immediately obvious. Haskell’s focus on ‘theory’ follows the same philosophy.