John Peterson writes

  Int is really not a nice
  datatype and we shouldn't be allowing it to crop up unexpectedly.

Yes, but if we believed that, we should use Integer, not Int, for
length.

You are right, beginners may stub their toe on factorial.  On the other
hand, with the default set to Integer, beginners may stub their toe
on bad performance.  Anyone familiar with, say, C, will be unsurprised
by the need to switch Int to Integer to get factorial to work, but will
be very surprised by the need to switch Integer to Int to get decent
performance.  -- P



Reply via email to