[Haskell-cafe] Why Haskell is beautiful to the novice

Tikhon Jelvis tikhon at jelv.is
Fri Aug 28 19:10:12 UTC 2015

Personally, I would try to start with something with immediate feedback.
Introduce functions on numbers with the REPL, something they are presumably
familiar with. Then go on to show how we can use and manipulate things
other than numbers in exactly the same way.

A fun place to go quickly is the diagrams package. Just like we can have
functions and operations with numbers, we can have them with shapes. Hook
it up to something like IHaskell so that students can render shapes in the
REPL just like they did with numbers.  It'll take some setup: IHaskell is a
pain to install and you might want to create your own wrapper around
diagrams to have simpler types.

But I think it would be worth it: you'll get an intuitive example of
functions producing more complex outputs with immediate feedback in the
form of pictures, made up by putting shapes together. The students will be
able to produce designs that look cool by experimenting with the library
while getting the hang of Haskell.
On Aug 28, 2015 7:46 PM, "Christopher Allen" <cma at bitemyapp.com> wrote:

> My coauthor Julie has written about running her 10 year old son through
> our Haskell book, though the book was written for adults. He's only gotten
> stuck arithmetical concepts he hasn't learned yet, nothing specific to
> Haskell or functional programming.
> https://superginbaby.wordpress.com/2015/04/08/teaching-haskell-to-a-10-year-old-day-1/
> He'll resume learning Haskell soon. He wants to get back to the Haskell
> and hasn't asked at all about the Minecraft modding tutorials he was doing
> because he feels like with Haskell he is being taught how things actually
> work, whereas the Minecraft modding was copy-pasta with little/no
> explanation. Haskell is also Julie's first programming language. I've cc'd
> her so she can say more about this if she wants.
> Haskell is great for teaching kids logic, math, data structures - you just
> can't skip details the way you can with experienced programmers. This isn't
> that much different from teaching adults who aren't experienced programmers.
> On Fri, Aug 28, 2015 at 1:12 PM, Rustom Mody <rustompmody at gmail.com>
> wrote:
>> On Fri, Aug 28, 2015 at 11:07 PM, Silvio Frischknecht <
>> silvio.frischi at gmail.com> wrote:
>>> > I kindly disagree.
>>> This being a haskell mailing list, I expected that :)
>>> > If the focus is to teach computer architecture, you are
>>> > not teaching programming. If the focus is on programming, then it
>>> should
>>> > focus on the conceptual aspects of programming, not on computers.
>>> > A course at school should of course teach both, but in my opinion not
>>> > concurrently. There’s no point in teaching something implicitly by
>>> using
>>> > the teaching of something else.
>>> It's more about algorithms than computer architecture. An imperative
>>> program very clearly describes algorithms; Haskell does not. Unless you
>>> have a very good understanding of things like lazyness, non-strictness
>>> and tail recursion, you wont know what happens when and how.
>> «It is easier to optimize correct code than to correct optimized code.»
>> --Bill Harlan
>> More heretically I draw your attention to Bob Harper's SECP
>> «everyone knows that algorithms as welearned them at school are
>> irrelevant to practice. »
>> http://www.cs.cmu.edu/~rwh/papers/secp/secp.pdf
>> In my view «CS is the science of algorithms» is one of those memes that
>> has held back our field because it underplays data.
>> And traditional programming pedagogy (aka imperative programming) is
>> wrong because it emphasizes code at the cost of data
>>> > We are not talking about undergraduates here, but kids or teenagers.
>>> > Think about which is the reason why you are teaching something to them.
>>> > It is not to teach some specific skill or to make them be advantaged in
>>> > future undergraduate courses. It is to teach them to reason.
>>> > Functional programming is just more reasoning than technicalities.
>>> All the more reason not to teach Haskell. To CS undergraduates you might
>>> teach your favorite programming paradigm. They can take it, and they
>>> will also learn others anyway. To teenagers who might never learn
>>> another language, it is not a good idea.
>>> >> There are also a lot of very basic data structures that can simply not
>>> >> be used in purely functional code like hash tables, pipes or random
>>> >> access arrays.
>>> >
>>> > Why do you think that manipulating arrays is a better skill to teach
>>> > to kids than manipulating linked lists?
>>> What about double linked lists then. Most updatable data structures are
>>> just clumsy in Haskell.
>> I see a lot of naivete in this thread (not just your claims).
>> Every programming language will do some things niftily and (many) others
>> clumsily.
>> And when as teachers we consider the importance of Law of Primacy
>> <https://en.wikipedia.org/wiki/Principles_of_learning#Primacy> we need
>> to carefully consider the order in which we introduce material.
>> A case could be made [as Donn Cave does below] for assembly.
>> From my pov getting Hindley-Milner intuitions right should take primacy
>> over updatable data structures.
>> Likewise the best language of your choice will be based on what you
>> consider primary.
>> How do we come to an objective evaluation of that??? Dunno...
>>> > There was a nice article on reddit of a parent that was in progress of
>>> teaching
>>> > Haskell to his/her 10-years old, and it was a great experience. I
>>> cannot find it anymore.
>>> > Remember, kids (motivated kids, at least) are way smarter than what
>>> school
>>> > usually seems to think.
>>> Some kids are smarter, some less so. In secondary school you should have
>>> a curriculum that most students can follow.
>> Just to be clear I'd be pleasantly surprised if someone can show haskell
>> is a good thing for school children.
>> I dont know what is... Depends on the school and the child I guess??
>> On FP finally (50 years after Lisp!) making it to the abc level of
>> CS-curricula:
>> http://blog.languager.org/2015/06/functional-programming-moving-target.html
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> --
> Chris Allen
> Currently working on http://haskellbook.com
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150828/e7a081ed/attachment.html>

More information about the Haskell-Cafe mailing list