r/programming • • Oct 01 '13

C Style: my favorite C programming practices

https://github.com/mcinglis/c-style
28 Upvotes

206 comments sorted by

View all comments

Show parent comments

-1

u/ryeguy Oct 01 '13

That's Github and therefore mostly for tiny toy projects.

Codebases are codebases (and there are plenty of serious projects on GH). Your claim was that it's only in "ancient" languages. This says otherwise. Stick to your guns.

And sometimes it's 1 or 3 or 8 or...

We can talk about technical probability or realistic probability. I prefer realism. Realistically anyone who used a 1, 3, or 8 space indentation in a modern day language would probably be shot on site.

outdated community preferences.

On the contrary, I have only seen 2-space indents on the newest and most hipster languages, and never in older ones. See scala for an example.

I also don't care about stupid religions...

You sound like the kind of guy who reinvents every wheel he can find. Writing idiomatic code is an important property of a good codebase.

0

u/[deleted] Oct 01 '13

[deleted]

1

u/ryeguy Oct 01 '13

I said "modern day". In my mind that meant Scala, Ruby, Python, etc.

-1

u/Menokritschi Oct 01 '13

See scala for an example.

I have to read Scala code, it's an indentation nightmare. Huge screens but 2(!) spaces. Really? 2013?

who reinvents every wheel

Just the squares which pretend to be wheels. I have to read the code why should I care about preferences of others if there is not a single rational advantage?

0

u/[deleted] Oct 01 '13

Because code is read by others. And code is also read more than written.

2

u/Menokritschi Oct 02 '13

That's my argument and that's why it should be user friendly and flexible: tabs.