Tell don't ask principal

How do you know if your are writing object oriented or procedural?
One good way to know it is by using the "tell don't ask" principal.

Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. 
— Alec Sharp

for more:

אין תגובות:

הוסף רשומת תגובה