[mercury-users] boolean expressions from semidet predicates

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon May 22 08:48:28 AEST 2006


"Jonathan Morgan" <jonmmorgan at gmail.com> wrote:
	Again, badly expressed.  Read "multiple levels of inheritance" - Clean
	seems to first have typeclasses for operators, and then inherit from
	these typeclasses to provide a Num class.  I don't know whether that
	would lower performance, but my guess is that it would.
	
Why go around guessing?  As it happens, Clean generates faster compiled
code than any other lazy language compiler I've come across, including ones
that didn't even have typeclasses at all.  The depth of inheritance in
the typeclass graph _as such_ doesn't seem to matter.

	Which I agreed with: that it could be implemented as a standard
	library feature.  Currently, Mercury doesn't, probably for efficiency.
	 However, I think that a much nicer (if impractical) system would be
	to have such typing as a compiler level feature with
	type-specialisation (maybe not by default as that could hurt code size
	too much).  I don't think that this could reasonably be done while
	keeping all the advantages of separate compilation, and I don't think
	that it's worth it in most cases, as users can define typeclasses if
	they want to.
	
Ah, now separate compilation is another issue.  However, I must say that
Clean does do what _looks_ like separate compilation.

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list