
10 Oct
2007
10 Oct
'07
10:03 a.m.
On Wed, 10 Oct 2007, Yitzchak Gale wrote:
Dan Piponi wrote:
The reusability of Num varies inversely with how many assumptions you make about it.
A default implementation of pi would only increase usability, not decrease it.
As the others have shown, you can compute PI in many ways. Which one is appropriate for the general case? Do you have so much types that you want to make instances of Floating, that manually defining 'pi' annoys you? Not giving a default implementation can even improve code because people have to think about a good implementation rather than relying on the default one.