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: decorator pattern & functional styler #82

Closed
Tracked by #15
eubinecto opened this issue Jun 2, 2022 · 2 comments
Closed
Tracked by #15

refactoring: decorator pattern & functional styler #82

eubinecto opened this issue Jun 2, 2022 · 2 comments

Comments

@eubinecto
Copy link
Owner

eubinecto commented Jun 2, 2022

Why?

  • explainer, translator -> styler와는 달리, 굳이 class로 정의할 필요가 없음.
  • self.log -> decorator 패턴으로 정의하는편이 가장 적절할 듯
  • styler -> 굳이 클래스로 정의하지 말고, 그냥 style 함수를 두 개 정의하는 편이 boilerplate를 줄이는 것
@eubinecto eubinecto mentioned this issue Jun 2, 2022
53 tasks
@eubinecto eubinecto changed the title refactoring: flat is better than nested & decorator pattern refactoring: decorator pattern & functional styler Jun 2, 2022
@eubinecto
Copy link
Owner Author

eubinecto commented Jun 2, 2022

out이 반복되는게 영 별로긴 하지만, 일단 이 구조로 가면 될 것 같다
image

기존의 코드 대비 나아진점?

  • 이미 존재하는 파이썬의 built-in library를 최대한 사용.
  • Styler.Logs 같은 boilerplate 코드가 필요없다. 로그는 이미 존재하는 logger를 참조하면 된다.
  • init.py를 사용

eubinecto added a commit that referenced this issue Jun 2, 2022
…ining functions under `style` functions. Logging capabilites are to be implemented later
eubinecto added a commit that referenced this issue Jun 23, 2022
@eubinecto
Copy link
Owner Author

이만하면 됐다. 이제 로깅까지 마무리하면 함수형은 마무리.

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