
This mentions and :: Foldable t => t Bool -> Bool as an example of "abstract nonsense". Well, I will run into teaching this soon myself, though not to freshmen - my students had some Java before but not Haskell. With regards to the type of "and", I will first have them write "data List a = ..." and a concrete "and :: List Bool -> Bool" from scratch. Later, to explain the type of "the true and" I will claim that the corresponding Java method would have type "static Boolean and (Iterable<Boolean> xs)" where Iterable<> is an interface (that the students should know). That's not too bad: xs.iterator() corresponds to toList xs (a lazy stream). "toList" would even be a complete definition for the Foldable instance? (since foldr f z = foldr f z . toList ) So perhaps "Foldable \approx Iterable \approx Enumerable" is a useful guideline. (Yes, there is a difference between a one-argument type class and an interface. But they have some common use cases.) - J.W.

On Thu, Apr 14, 2016 at 2:57 AM, Johannes Waldmann < johannes.waldmann@htwk-leipzig.de> wrote:
This mentions and :: Foldable t => t Bool -> Bool as an example of "abstract nonsense".
I find it sad... that people like Erik Meijer, Mark Lentczer... (even Doug McIllroy recently demonstrated that there are 2⁹⁹ dialects of haskell!!) are not being heeded And this complaint could be greatly alleviated with one little leaf drawn from racket -- language-packs: teachpacks https://docs.racket-lang.org/drracket/extending-drracket.html Along with the single lightweight directive #lang https://docs.racket-lang.org/guide/Module_Syntax.html#%28part._hash-lang%29 It may naturally be asked how is #lang different from ghc's language "-X" options A teachpack would be a bunch of coherent -X options maybe along with a suitable prelude

I don't think it's fair to say it's not being heeded, a few folks proposed
solution including usage of custom prelude and such... which seems quite
similar to that feature from Racket you mention (delta the the extension
thing, but solution can be found if there is enough interest for it).
I feel like with a bit of good will we could go a long way.
Cheers
On 14 April 2016 at 14:35, Rustom Mody
On Thu, Apr 14, 2016 at 2:57 AM, Johannes Waldmann < johannes.waldmann@htwk-leipzig.de> wrote:
This mentions and :: Foldable t => t Bool -> Bool as an example of "abstract nonsense".
I find it sad... that people like Erik Meijer, Mark Lentczer... (even Doug McIllroy recently demonstrated that there are 2⁹⁹ dialects of haskell!!) are not being heeded And this complaint could be greatly alleviated with one little leaf drawn from racket -- language-packs: teachpacks https://docs.racket-lang.org/drracket/extending-drracket.html Along with the single lightweight directive #lang https://docs.racket-lang.org/guide/Module_Syntax.html#%28part._hash-lang%29
It may naturally be asked how is #lang different from ghc's language "-X" options A teachpack would be a bunch of coherent -X options maybe along with a suitable prelude
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
-- *Λ\ois* http://twitter.com/aloiscochard http://github.com/aloiscochard

I suspect this wouldn't actually address too many of these concerns.
Perhaps it would work for Eric's case, where he's willing to use Hugs,
which is definitely not a realistic development tool anyway. Outside of
that, I think it's a bit revisionist to cast concerns about recent language
development as being about wanting a teaching sublanguage for new
programmers. A lot of the rest of the concern is actually people's belief
that Haskell is becoming too complex to be the right trade-off for
general-purpose software development. New programmers are mentioned
because some percentage of a realistic software engineering setting is
*always* made up of new programmers, and programmers who are new to the
tools or language. That isn't addressed by adding teaching modes; you
can't partition off your coworkers and relegate them to the teaching
dialect.
For what it's worth, it's already not too hard to build simplified dialects
of Haskell for teaching. I did it with http://code.world, and ran into few
problems despite some big changes. In my view, it doesn't matter much if
there's a single short directive to make it work with the ghc command
line. There are plenty of other advantages to wrapping GHC for education.
Once you've crossed the gulf from "the Haskell that everyone uses" to
"special island only for teaching new programmers", you've already lost the
benefits of living in the core Haskell ecosystem, and it no longer matters
if you add a few differences here and there.
On Thu, Apr 14, 2016 at 5:35 AM, Rustom Mody
On Thu, Apr 14, 2016 at 2:57 AM, Johannes Waldmann < johannes.waldmann@htwk-leipzig.de> wrote:
This mentions and :: Foldable t => t Bool -> Bool as an example of "abstract nonsense".
I find it sad... that people like Erik Meijer, Mark Lentczer... (even Doug McIllroy recently demonstrated that there are 2⁹⁹ dialects of haskell!!) are not being heeded And this complaint could be greatly alleviated with one little leaf drawn from racket -- language-packs: teachpacks https://docs.racket-lang.org/drracket/extending-drracket.html Along with the single lightweight directive #lang https://docs.racket-lang.org/guide/Module_Syntax.html#%28part._hash-lang%29
It may naturally be asked how is #lang different from ghc's language "-X" options A teachpack would be a bunch of coherent -X options maybe along with a suitable prelude
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
participants (4)
-
Alois Cochard
-
Chris Smith
-
Johannes Waldmann
-
Rustom Mody