DEV Community

Discussion on: 7 Valuable tips for Object Oriented Design 😏

Collapse
 
devanghingu profile image
Devang Hingu

your suggestion are great..!! i think there're following things you need to add.
1) Make code more readable.
2) Add comments over codes as you can..!!
3) Follow Prefix adjectives while naming of inheriting classes
4) Always write return at end of function it will destroy memory of all function's local variable and just return on variable.
5) At end of code provide brif summary.

Collapse
 
orimdominic profile image
Orim Dominic Adah

Hmm.. @ Your suggestion 4.. I'm not sure I understand you correctly but what if there's already a default built-in return statement for the programming language at the end of every function?