Live data from Hacker News

Teenage Haskell

twdkz.wordpress.com

21–30 of 93 posts

Re: Teenage Haskell

#21

Earlier quoted context omitted.

Scheme is quite simple compared to Haskell or even ML. Yet even MIT moved from Scheme to Python.

Did they have pure intentions in that move? I thought it was more out of popularity than any good metric.

The first time I learned programming it was Scheme, and I didn't care for it - the syntax was confusing and it felt more like magical incantations than giving the machine instructions. I didn't touch programming again for several years, but when I did it was python. I found it was much more interesting, in part because of my state of mind but also because I could see the computer responding to what I told it to do and I liked being "in control" of the machine rather than the other way around (which FP can sometimes feel like). I love functional programming now and I write a lot of Haskell, but I think there's real value to starting out with an imperative language to get that "interacting with the machine" feel. It also makes it easier IMO to learn about computational complexity, systems, etc. That, and python has a ton of great libraries, an intuitive syntax, and a lot of flexibility, so I'm not surprised they've adopted it.

Re: Teenage Haskell

#22
post #5

Earlier quoted context omitted.

This has been done with Scheme and works really well. But Haskell really is too complex.

Scheme is quite simple compared to Haskell or even ML. Yet even MIT moved from Scheme to Python.

SICP is still the bible, even through Python has become the "practical" language that's also quite simplistic.

Re: Teenage Haskell

#23

My brother (a Haskell programmer) and I (a teacher of high school CS) have talked about this often. He's postulated that teaching Haskell to kids with no programming experience would be an interesting experiment. Their lack of preconceptions regarding programming might make Haskell much easier for them to pick up, than it would for a student with experience in another language. What would be more interesting however,…

That's what my university did (Masaryk University Brno). It taught Haskell in the first semester. I, already programming in other stuff, was delighted to see a new interesting thing. Other students who already did some coding (PHP usually) reacted more like W.T.F. I'd this. I can't tell about the total newbs but in the end, only 30-40% passed. But that was mostly caused by their laziness because when they repeated the class and realized that they have to put in some work, the success was much better.

Re: Teenage Haskell

#24

My brother (a Haskell programmer) and I (a teacher of high school CS) have talked about this often. He's postulated that teaching Haskell to kids with no programming experience would be an interesting experiment. Their lack of preconceptions regarding programming might make Haskell much easier for them to pick up, than it would for a student with experience in another language. What would be more interesting however,…

Doesn't the University of Edinburgh teach Haskell to first year students? I've heard that from a few people at least. Not sure what their classes are like though.

Re: Teenage Haskell

#25
post #5

My brother (a Haskell programmer) and I (a teacher of high school CS) have talked about this often. He's postulated that teaching Haskell to kids with no programming experience would be an interesting experiment. Their lack of preconceptions regarding programming might make Haskell much easier for them to pick up, than it would for a student with experience in another language. What would be more interesting however,…

This has been done with Scheme and works really well. But Haskell really is too complex.

What about Haskell is too complex?

If you go through A Gentle Introduction to Haskell[0] I think you'll see it's a pretty simple language. There aren't that many parts of core Haskell to learn about.

Perhaps the abstractions such as Monad and Functor are more complex, but they don't seem anymore complex than some of the design patterns used to accomplish what they're used for.

0: http://www.haskell.org/tutorial/

Re: Teenage Haskell

#26

Earlier quoted context omitted.

> Would they think Python was stupid or would they be grateful that all of a sudden they could use a for loop? They would probably be at least as mystified by infinite loops as Python programmers are by space leaks.

There are infinite loops in Haskell too. (And space leaks in python)

Are any of the space leaks available without explicit syntax, e.g. genexps? GHC is smart, but only smart enough to mostly hide your misunderstandings about what it can do with your code.

Re: Teenage Haskell

#27
post #5

Earlier quoted context omitted.

This has been done with Scheme and works really well. But Haskell really is too complex.

What about Haskell is too complex? If you go through A Gentle Introduction to Haskell[0] I think you'll see it's a pretty simple language. There aren't that many parts of core Haskell to learn about. Perhaps the abstractions such as Monad and Functor are more complex, but they don't seem anymore complex than some of the design patterns used to accomplish what they're used for. 0: http://www.haskell.org/tutorial/

Monad and Functor are abstract, not complex. One of the things that is easy to forget once you know something is that the complex and concrete thing is often easier to understand than the simple and abstract thing. Of course, eventually you begin to consider the abstract thing to be concrete.

Re: Teenage Haskell

#28

Earlier quoted context omitted.

It's an experiment that I'll never run. CS exam requirements are geared towards OO languages. Students have to analyse and write pseudocode using traditional programming constructs.

What are CS exam requirements? Are they standardized? I went through the American system, and never had any of my tests biased to OOP (except of course, a Smalltalk chapter in one PL zoo class). Object thinking is easier to wrap one's head around than mathematical formal thinking, but that's just because the former uses the brain's innate linguistic hardware (we learn to talk without much effort) while the latter req…

The current AP standards focus a lot on OOP.

Here's the latest course description: http://media.collegeboard.com/digitalServices/pdf/ap/ap-comp...

Re: Teenage Haskell

#29
post #11

How did Sam get his name into his sheep picture? I don't see any functions that draw text among the seven functions the kids had at that point, and the text doesn't look like it was built by just drawing rectangles and circles.

If you go to the site, you'll find a link to the docs in it. They're not complete, but they do at least list the functions available. One of them renders text as a Picture.

Re: Teenage Haskell

#30
post #7

I never tried Haskell, or 'functional programming". To be honest, I don't even know what functional programming is. Can someone explain how is it different from Python or C (the only two languages I did little coding with)?

Still a great summary: http://www.haskell.org/haskellwiki/Why_Haskell_Matters
Post reply on HN