
Hi, Am Samstag, den 02.08.2014, 22:02 -0400 schrieb David Feuer:
As far as I can tell, Haskell 2010 does not specify anything about the strictness of genericLength. Currently, it is maximally lazy. This is good, I suppose, if you want to support lists that are very long and are using floating point or some similarly broken Num instance.
But this is not something many (any?) people have any interest in doing. As a result, the genericLength function is on a nice little list I found of Haskell functions one should never use.
I think it’s ok to have it this way. Just because you and I don’t like broken Num instances, it doesn’t mean people who do should have to suffer. So in the interest of api stability, -1 from me here. Let’s just continue not to use genericLength in non-broken code and let playful people play. (We could improve the docs if required, of course.) Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org