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

Design question: prefer methods or util functions? #575

Open
clinssen opened this issue Sep 19, 2020 · 1 comment
Open

Design question: prefer methods or util functions? #575

clinssen opened this issue Sep 19, 2020 · 1 comment
Labels

Comments

@clinssen
Copy link
Contributor

This a software patterns/design question that affects mostly the ASTNode class hierarchy.

Do we prefer ASTNode mehods, e.g. neuron.add_to_internal_block(foo) or do we prefer a package of helper functions, e.g. ast_utils.add_to_internal_block(neuron, foo)?

Note that the ASTNode class hierarchy is not currently being generated by Antlr, but this could hypothetically change in the (far) future.

@Silmathoron
Copy link
Member

I think the ast_utils module may slightly facilitate readability for future developers, rather than having a huge ASTNode class, but I am not sure the stakes are very high

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants