Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTORING] Rename wrappers to adapters #552

Open
georg-schwarz opened this issue Apr 18, 2024 · 0 comments
Open

[REFACTORING] Rename wrappers to adapters #552

georg-schwarz opened this issue Apr 18, 2024 · 0 comments

Comments

@georg-schwarz
Copy link
Member

          I think we have three possibilities:
  1. Accept the wrapping concept and name the method wrapASTNode for clarity. I think it is better to rename the method than the factory though.
  2. Apply SE patterns and consider the wrapping as an adapter (?) pattern, rename wrapperFactories to adapterFactories and rename the method createAdapterForASTNode (or similar?)
  3. 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.?

Originally posted by @rhazn in #549 (comment)

@georg-schwarz georg-schwarz changed the title Refactoring: Rename wrappers to adapters [REFACTORING] Rename wrappers to adapters Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant