[Grace-core] Early experience with traits not overriding superobject

Andrew P Black black at cs.pdx.edu
Wed Mar 9 22:49:43 PST 2016


Last weekend, I told James that I was willing try out the idea of used traits not silently overriding an inherited super.  I said that the worst that could happened was that one might need to add an occasional “exclude"

I just implemented this, and tried it on a version of the collections module. 

The first time I got it working, it reported  a conflict on == suitable for any enumerable.  A trait (enumerable) provides a definition of ==.  But, of course, the superobject (implicitly graceObject) already defines ==.  We want the real definition from the trait.

It’s not simple to put an exclude clause for == on the inherit graceObject, because there is no explicit `inherits graceObject`.  
And if there were, it would be illegal, since graceObject is not fresh.

In my view, putting in all of these inherit graceObject exclude == exclude asString  does not improve anything.  Not inheriting from graceObject would only make it worse, because we do want != and asDebugString and :: from graceObject.

Writing all of these inherits graceObject exclude == exclude asString clauses also makes me question the idea of multiple exclude keywords, rather than a comma-separated list.

	Andrew



 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20160309/d13631f8/attachment.html>


More information about the Grace-core mailing list