Jon Lang dataweaver-at-gmail.com |Perl 6| wrote:
e <g>.
Learn from the Haskell folks, who are still trying to untangle the mess they
made of their numeric hierarchy (see
http://haskell.org/haskellwiki/Mathematical_prelude_discussion).

I'll look it over.  That said, note that we're not dealing with a
class hierarchy here; we're dealing with role composition, which
needn't be organized into an overarching hierarchal structure to work
properly.


Yes. If you look at my specdoc, the ideas I've identified thus far are basically driven by which functions are sensible on which types. The basic math functions basically define the most primitive roles, as those are what you will be calling (and counting on being sensibly defined) when you write more complicated functions that take generic types, and gives a natural handle on how to specify which types your own function is sensible for.

--John

Reply via email to