[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

.

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 42
Thread images: 5

File: braces.png (6KB, 512x180px) Image search: [Google]
braces.png
6KB, 512x180px
.
>>
left is the only sane choice
>>
>>61148322
I do the middle
Is that bad?
>>
Instead of discussing meaningless stuff, why not spend your time writing actual code?
>>
first two are acceptable. if you do the third one you can fuck off, pajeet.
>>
>>61148344
Literally the opposite, middle is pajeet java standard, left is godawful.
>>
>>61148322
if (condition) { foo(); }
else { bar(); }
Lac of eye cancer.
>>
I use 3, but only if the line number of the if is a prime number. I use 2 otherwise.
>>
left is superior, right is ok, but middle one is fucking disgusting
>>
>>61148322
Right makes you sound more productive than you actually are.
>>
File: 1493755233500.jpg (58KB, 630x420px) Image search: [Google]
1493755233500.jpg
58KB, 630x420px
Left for client side code typescript/javascript and server side java
Right for server side c# code

The non pleb choice

middle is kys tier
using just one type is neet tier
>>
>>61148373
"Over 5000 lines of code!"
>>
>>61148355
You don't need the {}'s

if (condition) foo();
else bar();
>>
>>61148412
Why do we even let people like this have opinions?
>>
>>61148322
if (condition)
foo();
else
bar();
>>
>>61148322
Right

I know it's bad, but as a beginner I find it easier to read
>>
File: 1482542603485.jpg (187KB, 1920x1080px) Image search: [Google]
1482542603485.jpg
187KB, 1920x1080px
>>61148425
I work in a 20+ year old C code base and that style is goddamn everywhere. I like the elegant code golfyness of it, but still, takes a while to get used to it. Either way, beats the insane FORTRAN 77 syntax I see thrown around in our other code...my lord
>>
The left one only
>>61148355
This can also be acceptable
>>
Middle is best. Left acceptable. Right is for literal children. Not even kidding, that is how they teach children now, because it "looks more symmetric"
>>
>>61148322
Just use python. No curly bracket bullshit
>>
right is the only correct answer. all others are pajeet tier.
>>
>>61148322
Middle. Everyone at work does right though.
>>
>>61148425
this is the correct answer
>>
I wish every language had a gofmt tool, just so everyone would stfu about this and get back to actually programming.
>>
>>61148322
1st one my nigger
>>
>>61148322
Depends on code standards. Current company uses right, and honestly don't really have much of a problem with it, sure takes up more space but makes the code less jarring to go through.
>>
>>61148322
Middle, mainly because it's the standard used by my company.
>>
Depends on how the initial code structure was.

Gotta keep it consistent.
>>
The longer you program the further left you go
>>
>>61149297
the extra space makes code more jarring
>>
>>61149585
qft, started right now at left.
>>
File: 238904890234890234.jpg (24KB, 580x412px) Image search: [Google]
238904890234890234.jpg
24KB, 580x412px
>>61149700
Yeah, if you're fucking retarded. Go chug cock somewhere else.
>>
>>61148353
Name one single standard that uses anything besides left
>>
>>61149700
>clarity is "jarring"
>>
>>61149898
It's like. putting periods in the. middle of sentences.
>>
>>61149856
Google's C and C++ standard? fucking tardo lol. The only language that even uses left is java, literal pajeet language.
>>
} else {

ewww! You don't put anything on the closing line except maybe commet on what it closes if it's big block like

  } // switch
} // function

Middle one is the only one that should be used.
>>
File: scout.jpg (21KB, 400x370px) Image search: [Google]
scout.jpg
21KB, 400x370px
>>61149928
>elseif
>comment
>>
>>61148343
Get out with you and your logic, next your gonna say tabs or spaces don't matter use what you prefer
>>
>>61149911
Go does too :^)
>>
>>61148322
(condition) ? foo() : bar();
>>
>>61148322
,
Thread posts: 42
Thread images: 5


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.