On 3/24/07, <b class="gmail_sendername">Vivian McPhail</b> <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I agree with Sven, but...<br><br>What I want to push is a 'mathematically sound' numeric prelude. A proper<br>numerical prelude should have bona fide mathematical obects like groups,<br>rings, and fields underlying common numerical classes. It would be edifying
<br>to the student who discovered that the particular data type he is using is<br>an inhabitant of a known class and can thus take advantage of known<br>properties, presupplied as class methods. Reasoning and communication about
<br>programs, data types, and functions would be enhanced.</blockquote><div><br>One problem with that is that the instances are often times not mathematically sound - Int and Double certainly aren't.<br><br>Anyway, I agree with the general gist of this idea. However, I think rather than the Prelude, we should just be an interface to the internal stuff, a 'Builtin' module. Actually, there could still be a prelude - it would contain all the common imports (to maintain our decent scores in golf competitions :) ).
<br><br>I also like the idea that the addition of a module line would remove the implicit prelude import - the source code has become 'proper'. Before the module line, the programmer is probably in quick-hack/script mode.
<br><br>Numeric prelude-ness would be good. This brings up an issue - would the numeric classes need to be included/imported in Builtin? To avoid this, I think a bit of evillness (depending on your perspective, i suppose) is necessary - builtin functions would be stuff like AddInts and AddDoubles, not (+). The numeric stuff that provides the classes would also provide instances to wrap the builtin stuff.
<br><br>Hmm, just realized that PreludeBuiltin already exists... Ahwell, I think the renaming is a good idea - classes should not be involved in the builtins.<br> </div></div>