Accept the wrapping concept and name the method wrapASTNode for clarity. I think it is better to rename the method than the factory though.
Apply SE patterns and consider the wrapping as an adapter (?) pattern, rename wrapperFactories to adapterFactories and rename the method createAdapterForASTNode (or similar?)
Consider creating domain objects from AST nodes and use individual function names depending on type, e.g. createValueType, createBlockType etc that take an AST node as parameter. Probably rename the factory to something appropriate for this.
Thinking about it, I like the second option. To me it feels like it makes the wrapping concept more clear if you know SE patterns (which we should teach / expect students to know). I am not sure the adapter pattern is a 1:1 match but it feels correct.?
wrapASTNode
for clarity. I think it is better to rename the method than the factory though.wrapperFactories
toadapterFactories
and rename the methodcreateAdapterForASTNode
(or similar?)createValueType
,createBlockType
etc that take an AST node as parameter. Probably rename the factory to something appropriate for this.Thinking about it, I like the second option. To me it feels like it makes the wrapping concept more clear if you know SE patterns (which we should teach / expect students to know). I am not sure the adapter pattern is a 1:1 match but it feels correct.?
_Originally posted by @rhazn in https://github.com/jvalue/jayvee/pull/549#discussion_r1570216566_