[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: coding styles.jpg (60 KB, 680x383)
60 KB
60 KB JPG
>>
>designated bikesheding thread
>>
while x == y:
func1()
func2()

Problem solved.
>>
while(condFunc, trueFunc, falseFunc)
>>
>>103221005
Is this what keeps you up at night?
>>
Haskell style ftw
>>
in terms of being retarded none of these hold a candle to Bournegol
>>
>>103221005
Allerman is fine. GNU is a bit out there but acceptable. Everything else is just being heckin quirky for no reason.
>>
>>103221005
Allman and K+R are acceptable. The other ones are jokes.
>>
>>103221168
this
>>
>>103221005
Literally no one does Lisp style.
>>
i dont know how to code
>>
>>103221270
literally every mathfag uses lisp style
>>
>>103221005
Allman is conventional for C#, K&R for Java. I use both.
>>
>>103221005
At my company if you don't format your code in LLVM the CI/CD will do it for you then tell you after a two hour CI/CD pipeline you're a retard and fail the pipeline.
>>
imagine someone making a pr in haskell style. imagine a new hire joining and then creating a +10000 -9000 pr "refactor codebase to haskell style"

i think theyd get fired immediately
>>
>>103221005
The Microsoft clangtidy prefix.
>>
>>103221005
Allman is very common in corporate codebases because is more consistent when dealing with multi line function signatures.
>>
>>103221005
C syntax is a mental disorder.
>WHERE DO I PUT LE SPACE
That's what C "programmers" think about.
>>
>>103221005
I strongly prefer and use the one you got circled in green.
If something is using anything else and I need to make changes, then I forcefully reformat the code to that style.
>>
>>103221087
based Python enjoyer
>>
>>103221098
It's just about the ugliest thing I've ever seen. What do you see in it?
>>
>>103221005
webchads:
>let's discuss solutions to maintain a consistent database across multiple continents while minimizing transfers
system "programmers":
>muh curly brackets
>>
>>103221005
allman for functions, k&r for everything else
>but that's inconsistent!
function blocks are fundamentally different - they can't be nested
>>
>>103221005
def niggerloop:
if x == y:
if y == x:
func1()
func2()
niggerloop()
niggerloop()
niggerloop()
...

as many times as needed
>>
>>103221388
Stallman is a mathfag and he uses GNU style
>>
>>103221005
I use GNU's because my retard brain often ignores the first bracket.
>>
>>103223062
it works great if you're using it in haskell. but it's obviously a joke in this context
>>
>>103222885
Python fucks it up by overcomplicating it. It should only allow tabs, one tab matching one block deeper
>>
>>103221005
> Horstmann? More like Worstmann
>>
>>103221005
>haskell style
You're lying
.
>>
Horstmann is unironically the best
>>
>>103221087
K&R or GNU style, I'm a simple man.
>>
while (x == y) 
{func1(); func2();}
>>
File: perl style.png (40 KB, 711x385)
40 KB
40 KB PNG
introducing Perl, more K&R than K&R
>>
>>103221005
KR, Allman just looks ugly.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.