DEV Community

Discussion on: Coding Best Practices Part 1 (Naming Conventions & Class Designing Principles)

Collapse
 
kardonice profile image
shitpost_​​​​​​​bot

This is wildly over-expansive to the point of being useless.

If you're writing a project in Java or Qt, these recommendations are great. However, if you're using Python or Boost for a project, using camelcase for variables and functions will make your code look alien from the libraries you are working with. This is especially true with Python, where the official, recommended style guide contradicts (and overrides) the style suggestions here. There isn't one good integrated style guide for code. It depends on the project, the libraries used, and the language.

Collapse
 
mohitrajput987 profile image
Mohit Rajput

At the end, I mentioned that this is more of Java, C++ and PHP languages.
Languages like Python, ROR have different styles and use underscore as well. But class design principles are applicable everywhere in OOP.

Collapse
 
kardonice profile image
shitpost_​​​​​​​bot

The class design principles are definitely useful. But I think it's worth highlighting that rather than having a single, unifying style guide, that you should follow the conventions of the language or framework you are using, which will make your code readable, hopefully idiomatic, and easy-to-maintain.