sshyran / genxdm

Automatically exported from code.google.com/p/genxdm
0 stars 0 forks source link

TypesBridge includes subtype() method. Instead this should appear on SequenceType itself #68

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Seems sensible to me that a schema type should be able to tell you itself 
whether or not it is a subtype of another type. This appears to be a hold-over 
from when we had a bridge for type systems as well as elements.

Suggested solution - remove "subtype" from TypesBridge, add to SequenceType 
itself.

Original issue reported on code.google.com by eric%tib...@gtempaccount.com on 19 Sep 2011 at 1:09

GoogleCodeExporter commented 8 years ago
Not sure that this is what we ought to do. subType(), like several other 
methods in TypesBridge, basically provides a means of doing more complex 
operations on one or two sequencetypes than the simple, required functionality 
found in the type abstraction itself. In this case, implementation of subtype 
basically iterates over the type inheritance tree, comparing each ancestor with 
the target.

If we were to move subType(), would we not wish to move derivedFrom() ? That 
one's more complex, because it asks the question about not only inheritance, 
but about the form of inheritance. I do think that convenience methods, such as 
this, probably belong outside the core of the type abstraction functionality.

Original comment by aale...@gmail.com on 26 Jul 2012 at 7:29

GoogleCodeExporter commented 8 years ago
Changed owner.

Original comment by eric%tib...@gtempaccount.com on 6 May 2014 at 9:44