jl5501 Posted February 14, 2010 Share Posted February 14, 2010 Seeing some of the code that gets posted to this forum, I was wondering if some sort of preferred standard of indenation for readability should be promoted. I feel very strongly that some sort of formal indenting of code should be used and rigidly adhered to throughout ones code. Personally I prefer the Allman or ANSI standard where opening and closing braces are placed on lines by themselves and are in vertical alignment, with the code block betweemn them indented. Of course this leads to another well thrashed argument of how to indent. I prefer to use the tab, but I know there are strong advocates of a fixed number of spaces. I have a dislike of the very popular style, from K&R C, of placing the opening brace at the end of a line. Personally I find code laid out like this, hard to read, but really I suppose the important thing is to be consistent in the standards you apply I have been coding the way I do, for too many years to change the rigid standards I apply to my own code, but would be interested in hearing the views of the community here. Link to comment https://forums.phpfreaks.com/topic/192055-code-layout-indentation/ Share on other sites More sharing options...
Andy-H Posted February 14, 2010 Share Posted February 14, 2010 Wrong forum, this has already been discussed in the Misc. forum. http://www.phpfreaks.com/forums/index.php/topic,282348.0.html Link to comment https://forums.phpfreaks.com/topic/192055-code-layout-indentation/#findComment-1012221 Share on other sites More sharing options...
jl5501 Posted February 14, 2010 Author Share Posted February 14, 2010 thank you Link to comment https://forums.phpfreaks.com/topic/192055-code-layout-indentation/#findComment-1012223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.