mercredi 6 janvier 2021

Is 'Class' against the rule of 'separation of concern'?

For a 'class' in modern programming languages, e.g. Java/C#/C++/Python..., it contains both data and logic in one place. However, according to 'separation of concern', it seems that we shouldn't mix data with logic. I know both are right, but how to explain the two seemingly conflicting ideas?

Aucun commentaire:

Enregistrer un commentaire