Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why schools teach functional programming

Name: Anonymous 2015-11-10 21:22

Now how can we possibly manage to level the playing field between the Alan Kays and the Jackson Pollocks in class? The answer is simple. Use a programming language and a programming paradigm that is generally not used by high school students. I favor Haskell, Scheme or maybe ML or O'Caml. From what I have seen as a TA, high school programmers mostly write code in C, C++, Java, C#, some dialect of Basic or some dialect of Pascal. All of these languages are imperative languages while none of the suggested languages are imperative. Well, ML and O'Caml are kinda imperative but I'd focus on the functional parts of these languages.

Can you imagine what the results of teaching freshmen these languages are? Well, except the endless bitching and moaning of the students who have prior experience in languages like C++ and Java. "This is useless", "Why don't we learn C++", "That's not how it works back home", "Nobody outside of academia uses these languages", "These language are too slow". I know all the complaints already. But they're not important. What is important is to level the playing field between freshmen who believe they know everything already and freshmen who know that they don't know anything about programming. Of course we're not going to level the playing field perfectly. Prior programming experience means something, no matter in what language people programmed during high school. Consequently even the leveled playing field will not look like the Bonneville Salt Flats. It'll be more like the Low Countries but at least it's not the Himalayas anymore.

Name: Anonymous 2015-11-11 19:46

Why don't you read why a real CS teacher at CMU teaches kids FP instead of quoting bullshit?

https://existentialtype.wordpress.com/2012/08/17/intro-curriculum-update/

The most important decision was to emphasize functional programming right from the start, and to build on this foundation for teaching data structures and algorithms. Not only does FP provide a much more natural starting point for teaching programming, it is infinitely more amenable to rigorous verification, and provides a natural model for parallel computation. Every student comes to university knowing some algebra, and they are therefore familiar with the idea of computing by calculation (after all, the word algebra derives from the Arabic al jabr, meaning system of calculation). Functional programming is a generalization of algebra, with a richer variety of data structures and a richer set of primitives, so we can build on that foundation. It is critically important that variables in FP are, in fact, mathematical variables, and not some distorted facsimile thereof, so all of their mathematical intuitions are directly applicable. So we can immediately begin discussing verification as a natural part of programming, using principles such as mathematical induction and equational reasoning to guide their thinking. Moreover, there are natural concepts of sequential time complexity, given by the number of steps required to calculate an answer, and parallel time complexity, given by the data dependencies in a computation (often made manifest by the occurrences of variables). These central concepts are introduced in the first week, and amplified throughout the semester.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List