C Style #13
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The current style in CONTRIBUTING is 80col tabstop=2. I like 80 columns (my framebuffer on my cutepad isn't much wider) but 2-char tabs cause some issues for me:
u:
instead ofusage:
would occupy an entire tabstop). Gotos are necessary for flow control, used to break out of multiple layers of loops. The alternative without gotos would be clunky. In particular see src/str.c:56.usage:
gotos can be relegated to functions that end inexit(3)
but I would prefer to return from main.I think in C enforcing 4-char tabs, and tabs as
'\t'
, would be nicer, and for Go and Rust source files using gofmt and rustfmt respectively before committing them.My favorite option for C would be 8-char tabs and
'\t'
as this is the default in nearly all terminal emulators and it would be a nice win for the sufferers of ed(1). Acme and Sam from Plan 9 also have this as an unconfigurable default. However I don't think this would be a popular choice.that 2-tabstop thing is inherited from my other projects :P i’ll change it to 4 later and add a .editorconfig
Why was this closed?
Oh, a .editorconfig was added to clarify the style. Thank you!