[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Brackets. Under or to the side?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 13
Thread images: 1
File: OverVSide.png (188 KB, 1151x690) Image search: [Google]
OverVSide.png
188 KB, 1151x690
Which way do you prefer?
>>
just follow google style convention for your language
>>
>>54827580
I did the first style in school because that's how I learned to program. Then I read K&R and the Linux kernel coding style guide and discovered that anything not K&R is wrong because (a) K&R are _right_ and (b) K&R are right.
>>
>>54827580
https://www.kernel.org/doc/Documentation/CodingStyle
now fuck off
>>
>>54827769
I was just asking your preference. Jeez. I personally prefer under as it provides more readability. For me at least
>>
>>54827823
I'm just curious. I don't know any programmers IRL to ask.
>>
>>54827769
if(faggot)
{
print("fuck you");
}

fuck you
>>
>>54827580
It only matters that you do the right thing in context, and that you commit to a usable and logical convention. The kernel.org text isn't a perfect style guide in itself, but it can teach a great lesson about why styling appropriate to your context is important.
>>
>>54827853
Alright, are you guys /hostile/ because of the print statement? or the question?
>>
To the side, but fuck not putting a space between it and the last block of text
>>
>>54827853
>can use code tag
>can't indent
maybe you should end yourself.
>>
side
less keystrokes
having to press enter twice, inserting a bracket in between
would you do
def a()\
:
print("faggots")

in Python?
>>
>>54827580
Top; more work as >>54828660 says but i find it infinitely more readable.
Thread replies: 13
Thread images: 1

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.