New type of ($) operator in GHC 8.0 is problematic

Christopher Allen cma at bitemyapp.com
Wed Feb 17 16:09:17 UTC 2016


I agree 100% with Manuel here. My N is smaller (100s rather than thousands)
but this is what I've seen working with self-learners, programmers and
non-programmers alike. I don't have anything further to add because I
couldn't find a point in his listing that didn't match my experience.

> Sorry for the mostly off-topic post, but since a beginner’s Prelude was
mentioned here multiple times recently as a countermeasure to making the
real Prelude more complicated, I just want to say, don’t put too much hope
into a ”solution” you never actually tried.

I have tried a beginner's Prelude with people. I don't have a lot of data
because it was clearly a failure early on so I bailed them out into the
usual thing. It's just not worth it and it deprives them of the
preparedness to go write real Haskell code. That's not something I'm
willing to give up just so I can teach _less_.


On Tue, Feb 16, 2016 at 5:05 PM, Manuel M T Chakravarty <
chak at justtesting.org> wrote:

> > Richard Eisenberg <eir at cis.upenn.edu>:
> >
> > On Feb 16, 2016, at 5:35 AM, Ben Gamari <ben at smart-cactus.org> wrote:
> >> Indeed. I'll just say that I envision that a beginner's prelude would be
> >> for learning and nothing more. The goal is that it would be used in the
> >> first dozen hours of picking up the language and nothing more.
> >>
> >> I'd be interested to hear what Richard had in mind when he has time
> >> again.
> >
> > Yes, that's right. And, of course, it doesn't even need to be something
> released with GHC.
> >
> > I hope to have the opportunity to teach intro Haskell in the
> not-too-distant future. Maybe even this coming fall. Though I have yet to
> look closely at Chris's book, which will be one of the first things I do to
> prep, I suspect I'll be writing a custom Prelude for my first few weeks of
> the class, eliminating all type-classes. No Foldable, no Monoid, no Num.
> And then, by week 3 or 4, bring all that back in.
>
> As somebody who has taught Haskell to hordes of students (literally,
> 1000s), I am not at all convinced that this is going to be helpful. This is
> for the following reasons:
>
> * Students understand the basic idea of overloading for Num, Show, etc
> easily (week 1 or 2). We actually tried both doing basic overloading very
> early or delaying it until later. The former worked much better.
>
> * You are not in a position to explain Foldable and probably not Monoid by
> week 3 or 4. So, either you need to have more than one beginner Prelude,
> delay overloading until much later (awkward), or we are really only talking
> about the impact of Show, Num, etc here.
>
> * Changing things (i.e., one Prelude to another) always confuses some
> people — i.e., there is an intellectual cost to all this.
>
> * Students will want to use Haskell on their own computers. Then, you need
> to make sure, they import the right Prelude and that they stop importing
> the beginner Prelude when you switch back to the normal one. A certain
> percentage of students will mess that up and be confused.
>
> What we found works best is the following:
>
> * Introduce the concept of overloading right away. People get that easily,
> because they use overloaded arithmetic functions in math, too. (Num and
> Show are the typical classes to explain it at.) As an example, see how we
> do that in the first chapter of our new Haskell tutorial:
> http://learn.hfm.io/first_steps.html
>
> * Be careful in designing your exercises/assignments (esp early ones), to
> make it unlikely for students to run into class related errors.
>
> Sorry for the mostly off-topic post, but since a beginner’s Prelude was
> mentioned here multiple times recently as a countermeasure to making the
> real Prelude more complicated, I just want to say, don’t put too much hope
> into a ”solution” you never actually tried.
>
> Manuel
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>



-- 
Chris Allen
Currently working on http://haskellbook.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160217/d72afa0e/attachment-0001.html>


More information about the ghc-devs mailing list