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

Nicola Gigante nicola.gigante at gmail.com
Fri Aug 28 16:23:35 UTC 2015


> Il giorno 28/ago/2015, alle ore 17:45, Silvio Frischknecht <silvio.frischi at gmail.com> ha scritto:
> 
> Hi,
> 
> In my opinion, Haskell is a terrible first language to learn.
> 
> It has a very complicated type-system, and it's restriction to purely
> functional programming does not convey very well how (current) computers
> work. Current computers work by you giving them an step by step guide
> what to do. This I think is what should be at the base of any
> beginners-programming course.
> 

I kindly disagree. 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.

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.

That’s also why I don’t agree with the math curriculum in high-school
(only elementary algebra, trigonometry and basic calculus, at least here in Italy).
If a student doesn’t go to college or studies something non-scientific
(or even some low-math science), he’ll never see an abstract
mathematical concept (see e.g. groups) in all his lives, thus living
forever by completely ignoring what math is all about.
(and this is really connected with the record-low public trust in science
that we are suffering).

My reasoning applies to any functional language, not just Haskell.
If you don’t want to worry with the type system, you can turn to
Common Lisp or Racket. I started with scheme and it was indeed pretty
amazing.

> 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?

> 
> Haskell also requires quite a bit of intelligence and perseverance to
> master. So unless your kids are all geniuses I would not recommend it.
> 

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.

> Python would by my language of choice. You won't have to worry about low
> level stuff or typing, but can still write those step by step programs.
> 

Python would be also my first choice if I had to choose an imperative language,
that’s granted.

> Cheers
> 
> Silvio

Cheers,
Nicola


More information about the Haskell-Cafe mailing list