[framework-discuss] Continuing the topic of codestyle

[ Thread Index | Date Index | More lists.aurorafoss.org/framework-discuss Archives ]

We need to settle this topic ASAP, because the inconsistencies keep coming up on PR's and discussions. The sooner we close this topic, the better.

This is my list of opinions regarding specific cases I am against. If I don't mention a topic in this list, is because I'm not against it:

- Documentation: We should use DDoc and deprecate Doxygen style of documentation.
- Private Variables: Marking variables with an _ (underscore) are just ugly and pointless. I realize there are cases that leave no option (most notably the @property UDA from Dlang), but basically, if you can avoid it, avoid it.
- Usage of this: Using the this keyword improves readability and differentiation between a class variable and external variable.. My opinion is that every time there is an interaction between a class variable and some other variable that doesn't belong to that class (such as assigning variables), it's important to use the this to further reinforce this separation. Otherwise, there's no need to add it (for example, if a method only deals with class variables and returns something. It's bloat some to add the this here, IMO)
- Braces: I prefer to open a brace in the same line as a function declaration.
- Spaces: I'm against adding an extra white space after these keywords: if switch for while catch
- Headers and macros: This is a remnant of the C++ code style, It should be deleted

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/