<div dir="auto"><div>FYI, it's not my idea; I just figured I could slot it in. I have no idea what pipelines night mean in this context. Something to do with Unix utility composition?<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 20, 2021, 2:05 AM Joachim Durchholz <<a href="mailto:jo@durchholz.org">jo@durchholz.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 19.09.21 um 23:04 schrieb Richard Eisenberg:<br>
> Popping up a level: for me, the value in these ideas is not their precision, but rather their familiarity. Give me intuition first, correctness later.<br>
> <br>
> [...] Another example: we now know that object do not accelerate parabolically under the influence of gravity, because of general relativity. But general relativity is hard, so we still teach about parabolic curves for objects in freefall. Once a student knows more physics, they can return and refine their knowledge.<br>
> <br>
> So can it be with Haskell. We sometimes get so caught up in being "right" and precise, that we forget that it is sometimes useful to paper over some details for the sake of intuition.<br>
<br>
I agree that you need to have a first working model initially, with all <br>
the details coming later.<br>
<br>
In the case of monads, I think that the usual initial model (a monad is <br>
a pipeline) is insufficient even at the novice level.<br>
I'll argue for that from observation, and from reasoning.<br>
<br>
Observation: Many novices come up with questions about monads. It's the <br>
number one stumbling block, and the thing that keeps people turning away <br>
as in "that's all too mathematical".<br>
Compare this with Java:<br>
public static void main(String... args)<br>
which floods the user with four advanced concepts (public, static, void <br>
results, varargs parameters), yet gives rise more to ridicule than <br>
frustration.<br>
More importantly, each of these concepts immediately points to something <br>
that you can explore and understand separately.<br>
<br>
Reasoning:<br>
Most expositions of monads start with some kind of pipeline concept.<br>
The problem with that is that it's misleading without giving people a <br>
clue where they're going wrong.<br>
E.g. think "pipeline" and hit Maybe and Error. These concepts don't <br>
"look like" a pipeline, more like a variation of function composition - <br>
but why is it then a monad instead of function composition?<br>
List is even more difficult to fit into the pipeline methaphor. Using <br>
List's monad properties is mostly interesting for tracing all cases of <br>
nondeterministic behaviour, but you very rarely do that in code, so it's <br>
not a big deal - but it still is a cognitive dissonance for the student, <br>
a sore spot in the mental model.<br>
<br>
Even before these two, you see IO. You can easily get away with the <br>
pipeline model at first when you just do output, but as soon as you have <br>
input and decisionmaking (i.e. the output becomes a decision tree, each <br>
run of the program following one path from the root to a leaf - actually <br>
it's a DAG and nonterminating programs don't necessarily have leaves), <br>
the pipeline model is not a good fit anymore.<br>
(I very much like David Feuer's idea how to teach angles in terms of <br>
"turns". It carefully avoids putting the student at a wrong track. Since <br>
radians are taught waaay after division by fractions, even the division <br>
by an irrational number that you need to "explain" radians isn't such a <br>
big deal - i.e. it also orders concepts in an order where each concept <br>
can be explained based on things the student already knows.)<br>
<br>
<br>
Just my 2 cents, and based on more thinking than programming, so it may <br>
not be worth much.<br>
<br>
Regards,<br>
Jo<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div></div>