bsloane1650 commented on a change in pull request #324: WIP: DAFFODIL-1444 Schema Compiler Space/Speed URL: https://github.com/apache/incubator-daffodil/pull/324#discussion_r379867938
########## File path: daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala ########## @@ -40,7 +40,63 @@ import org.apache.daffodil.xml.QName import org.apache.daffodil.xml.XMLUtils import org.apache.daffodil.dsom.ExpressionCompilers import org.apache.daffodil.runtime1.ElementBaseRuntime1Mixin +import org.apache.daffodil.dsom.SchemaSet +import org.apache.daffodil.dsom.SharedFactory +import org.apache.daffodil.grammar.primitives.ConvertTextBooleanPrim +import org.apache.daffodil.grammar.primitives.LeadingSkipRegion +import org.apache.daffodil.grammar.primitives.SimpleNilOrValue +import org.apache.daffodil.grammar.primitives.LiteralValueNilOfSpecifiedLength +trait SharedSimpleValueFactoryMixin { sset: SchemaSet => Review comment: Didn't we define an almost identical trait earlier; with the only difference being SharedType differed. Would it make more sense to have a common SharedTermFactoryMixin[A] trait that is paramiterized by the the type of term that is being shared? If we need seperate traits for each type (e.g. for pattern matching), we should be able to defined concrete sub-traits along the lines of: trait SharedSimpleValueFactoryMixin extends SharedTermFactoryMixin[Gram] ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services