Date: Sun, 05 Apr 2015 15:22:47 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: Coding Style On 2015-04-05 14:04, Solar Designer wrote: >> BTW I am tempted to officially have Jumbo deviate from core's tab width >> recommentdation, using 4 instead of 8. With the "indent with TABs, align >> with spaces" requirement (which I'm prepared to kill for) this only >> affects how long a line gets[*]. It seems to me absolutely no-one use 8 >> (except I use to do it when working with John - but I'm about to give >> that up) so many lines are committed that did not exceed column 80 with >> the author's TAB setting but do when 8 is used. > > I use 8 char tabs, and I like them. In early 1990s, I used to prefer > indentation with a few spaces (2 or 3), but later I realized that if I > need so many indentation levels that 8 char tabs start being a problem > (push lines beyond 80 chars), this usually means that the code needs to > be refactored (usually split into more functions). I can relate to that and for core this is a good decision. But in Jumbo we live with lots of external things: Macros like CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR and functions like clCreateProgramWithBinary(). Not to mention AMD's ADL. We get crazy long lines without writing code that should be split to more functions. Actually for OpenCL host code I often just give up and let it span several lines. > 8 char tabs are used in Linux kernel, and in many *BSD's KNL > http://en.wikipedia.org/wiki/Kernel_Normal_Form They also decide their name space. We can't. Also, no matter what you and I say or want, virtually everyone that contributes to Jumbo DO use 4 or smaller, and I'd rather not complain too much about it (risking just ending up with less contributions). If we say 4, we might get away with enforcing it. magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.