<div dir="ltr"><div>To add to Nicola's mail, I think what would be cool is to provide the "complex" parts to students, ie: IO handling, complex structure manipulation,... well, all that is not the focus of the current lesson nor a thing they learned in a previous course. For example, you can provide this kind of program:</div><div><br></div><div><div>isSquare :: Int -> Bool</div><div>isSquare n = undefined</div><div><br></div><div>-- Don't touch for the moment</div><div>main :: IO ()</div><div>main = do</div><div>  putStrLn "Square checker: check that an integer is the square of another integer."</div><div>  putStrLn "Input the integer to check: "</div><div>  input <- getLine</div><div>  let number = (read input :: Int)</div><div>  if (isSquare number) </div><div>      then putStrLn (show number ++ " is a square!")</div><div>      else putStrLn (show number ++ " is not a square!")</div><div><br></div><div class="gmail_extra">(Maybe isSquare is not the best function for a student to create for a first time, but you get the idea)</div><div class="gmail_extra"><br></div><div class="gmail_extra">What can be a good idea is to make the students create their own set of functions as exercise and then create a bigger project reusing these. I can remember my own programming course where the code I created was then ditched for the reason it was only for an exercise. It was a bit disappointing.</div><div class="gmail_extra"><br></div><div class="gmail_extra">My whole point is: show your students the immense reusability of Haskell code and the enjoyment of its composability.</div><div class="gmail_extra"><br></div><div class="gmail_extra">-- Romain</div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-28 12:12 GMT+02:00 Nicola Gigante <span dir="ltr"><<a href="mailto:nicola.gigante@gmail.com" target="_blank">nicola.gigante@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><br>
> Il giorno 27/ago/2015, alle ore 23:08, Olaf Klinke <<a href="mailto:olf@aatal-apotheke.de" target="_blank">olf@aatal-apotheke.de</a>> ha scritto:<br>
><br>
> Dear cafe,<br>
><br>
> please correct me if questions like this should not go via this mailing list.<br>
> Presumably everyone on this list agrees that Haskell stands out as a beautiful and pleasant language to have. The recent nitpicking and real-world problems like cabal hell don't change that. However, statements supporting Haskell's beauty usually involve: "In Haskell it is so much clearer/easier/faster to ... than in another language." That is, the beauty of Haskell presents itself to those who can compare it to other imperative or not strongly typed languages that one learned before Haskell.<br>
> My question is, for what reason should anyone not acquainted with any programming language find Haskell beautiful? Maybe it does not look beautiful at all to the novice. The novice can not draw on the comparison, unless he takes the effort to learn more than one language in parallel. The novice likely also does not have the mathematical background to see the beautiful correspondence between the language and its semantics. (My reason to love FP is because it is executable domain theory.) One might argue that it is not the language itself that is beautiful, but rather the concepts (data structures, algorithms, recursion) and Haskell does a great job to preserve their beauty into the implementation. Do you agree?<br>
><br>
> Disclaimer: I am about to start teaching a first course in computer science in secondary school. I can teach whatever I want, since this is the first CS course the school ever had. I want to teach beautiful things. I love functional programming. I need not start teaching programming right away. But I am reluctant to expose the pupils to something whose beauty escapes them completely.<br>
><br>
<br>
<br>
</span>In my opinion, the first CS course in school (and to some extent<br>
the math and physics courses as well) should aim, more than teaching specific<br>
skills or knowledge, to transmit to student the beauty of programming _itself_<br>
(respectively math and physics).<br>
The student should be able to perceive the feelings of wonder and enlightenment<br>
that rise from solving a challenging problem, or to understand some<br>
previously obscure phenomenon, by applying math and reasoning.<br>
<br>
This objective is well suited for a CS course because students can also<br>
be initially motivated by the promise of learning something really useful.<br>
<br>
Haskell is particularly well suited for this task, not because the student would<br>
necessarily be able to perceive the beauty of Haskell itself, but because<br>
Haskell does not obscure, and in some ways enhance, the beauty of<br>
programming as a whole. In contrast, when first CS courses start with<br>
convoluted or low level languages such as C or Java, students loose<br>
the point of everything, overwhelmed by pointers, useless OOP,<br>
obscure syntax, low-level technical details. Wonder and enlightenment<br>
become pain and frustration.<br>
<br>
Btw, if you want to _also_ teach computer architecture in addition to<br>
programming, I think that is best suited to a different part of the course<br>
and does not need to be interleaved with learning programming, so<br>
I wouldn’t bother with C and the like. Or better, you can explain C<br>
as a tool to better understand computers and operating systems, but<br>
after they’ve learnt how to program, not as a tool to learn programming.<br>
<br>
Using Haskell (specifically some kind of concepts, e.g. equational reasoning)<br>
will also make easier for students to see the connection between math<br>
and programming, making them more motivated to learn math as well.<br>
<br>
To me, your choice to start the CS course by teaching Haskell is<br>
a wonderful choice and your students will thank you in a few years.<br>
<br>
Go ahead!<br>
<br>
> — Olaf<br>
<br>
Greetings,<br>
Nicola<br>
<div><div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div></div></div>