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

Architecture: should data be internally represented by immutable structures only? #46

Open
lhaze opened this issue Jan 28, 2019 · 2 comments
Labels
architecture Discussions about Principles and Assumptions of the Design help wanted important question
Milestone

Comments

@lhaze
Copy link
Collaborator

lhaze commented Jan 28, 2019

No description provided.

@lhaze lhaze added question important architecture Discussions about Principles and Assumptions of the Design labels Jan 28, 2019
@lhaze lhaze added this to the 0.1 milestone Jan 28, 2019
@lhaze lhaze added this to To do in Data description & validation via automation Jan 28, 2019
@lhaze lhaze modified the milestones: 0.1, 0.2 Dec 1, 2020
@ms-lolo
Copy link

ms-lolo commented Feb 15, 2021

Been poking around your issues for inspiration. Thanks for putting this repo together! I've started working in Python much more heavily in the last few years and have been very disappointed with the current "best practices". It was very refreshing to run into this repo and see you folks try to apply Uncle Bob's clean architecture concepts to the Python world. I'm going to try and become more familiar with this repo and the issues and see if I can contribute :)

As far as this topic goes, I've been trying to have as much of my data objects use frozen dataclasses as possible. However, I'm finding it very difficult to make sure everything is immutable. For example, it's really easy to use dictionaries in a few places, but dictionaries are mutable. I end up writing a lot more code just to convert between types the user is used to and types I store internally as immutable values. Would love to know if you folks have experimented with making things strictly immutable and if you have a found a decent way to develop this way without writing a lot of boilerplate code.

Cheers!

@lhaze
Copy link
Collaborator Author

lhaze commented Feb 23, 2021

@ms-lolo Thank you for your appreciation and questions. I'm sorry you have to wait for the answer, but you got me during a very busy time.
I'll relate to your questions in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Discussions about Principles and Assumptions of the Design help wanted important question
Development

No branches or pull requests

2 participants