indentation styles

While reading a Ruby tutorial (screw me, I had to do it this time) the writer mentioned "Whitesmith style", which was totally alien to me. Some more informative Wikipedia pages later I knew that this stuff was an indentation style for C/C++ and alike languages. It's interesting to read about it cause it's one of the things I can't really force myself to do. I'm more of a "stream line" programmer who styles as he codes. And depending on how codes (I code usually always the same way) the formatting changes. I have my own way to format code, mostly to save screen space and bring as much information as possible. This also means that, for small functions, I use completely horizontally aligned code. I've never had problems with codelines this way! Well, depending on you indentation style, you have more lines or less. I learned how well the most minimal amount of required operations goes together with condensed coding styles. However, I currently fortifying what I was already doing and also started to use tabs instead of spaces. Or let's say spaces for normal command-per-command code and tabs for indentation, prototype alignment and so on. Fixed width of 4. I'm also quite a bit fascinated with LISP-style comments I have to say. It saves even more space and you can read code by indentation instead of those usually extremely dominant empty "}" brackets. Yeah, that sounds like a cool solution. While coding my improved linked list variant, I'll try a bit. Only problem is that these are templates and so small in code that they fit in one line... Too bad! However, I have some projects this semester, so I can test them out as I want...

No comments: