[Haskell-cafe] Foldable for (,)
amindfv at gmail.com
amindfv at gmail.com
Thu May 4 01:09:05 UTC 2017
> El 3 may 2017, a las 17:58, Richard A. O'Keefe <ok at cs.otago.ac.nz> escribió:
> What we have here is a feature interaction problem.
> There's a combination of features (Foldable, Traversable, ((,) a), &c)
> each of which is sensible and useful, but which together give people a
> nasty surprise.
> We also have the combination of a language which is getting a lot of
> attention in terms of expressiveness, mathematical power, consistency
> and all manner of goodness BUT less attention with respect to beginners
> and bears of very little brain like me.
> If I write something that evaluates to length (2,3), it will
> quite definitely be unintentional. I'm reminded of a feature
> that Emacs used to have (and maybe still does): there were lots
> of commands that beginners were much more likely to type by
> accident than on purpose, so when you typed on, it would tell
> you something like "you just typed Ctrl-Meta-Explode, which does
> XYZ, are you sure you meant to do that?" and if you said yes, it
> remembered that and would let you use it again. That's one way
> to try to combine power for experts with safety for beginners.
> Again, if I remember correctly, PLT Scheme (now Racket) had
> similar support for beginners, where you could choose different
> language levels so that beginners didn't have to worry about
> major or even minor arcana.
> What I'm wondering here is if there's room in the Haskell world for
> something similar? Perhaps some sort of Profile: <profile name>
> pragma, where profiles can say things like "tuples are not Foldable".
> Does everyone have "beginner" days, or is it just me?
I find that when people write code as teams, on deadlines, they tend to hit every problem - beginner or not - that there's no protection against.
Another potentially-interesting angle to look at this from is security: how easy is it to write innocent-looking code which does something unexpected?
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
More information about the Haskell-Cafe