注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Talk:Coding Standards

From Funtoo
Jump to navigation Jump to search

Screens may be able to handle more than 80 characters. Printers don't, and people do like to print out code from time to time to look at on paper. So, go bigger than 80 characters when you need to, not just because you can. There are usually ways to make it fit. Long lines can also indicate you are doing something too complex, so maybe it should be split into its own method or function.

I don't personally have a bias in general regarding tabs or spaces. Things are bound to mess up either way. However, I do prefer sticking with the the language's preferred convention if there is one. In the case of Python, that is spaces where an indent consists of four spaces. This makes for consistency when you work with integrating external code, which should generally follow the established convention of the language.

I never originally knew what they were, but many editors have mode lines. I suggest including them. This communicates the formatting preference in the document, and many text editors support them to some degree.

--Brantgurga 03:29, 29 December 2010 (CET)