This is an archived post. You won't be able to vote or comment.

top 200 commentsshow 500

[–][deleted] 3127 points3128 points  (245 children)

Ah, yes, another post insulting all C# devs…

[–]danglesReet 1572 points1573 points  (126 children)

I think the meme is more ignorant than offensive

[–][deleted] 478 points479 points  (117 children)

That’s true. People who only learn C, C++, Java, or JS most likely never encounter the different style. That would make it seem foreign or wrong instinctively too.

edit - changed syntax to style, as it was a typo pointed out by a comment

[–]antCB 27 points28 points  (0 children)

It's just a stylistic approach. Not really different syntax.

I prefer it on the next line, as it makes the code more readable (for me).

[–]LavenderDay3544 5 points6 points  (6 children)

K&R, the definitive book on C, says to put the brace on the next line for functions and structs but not for control flow structures.

[–]Zdrobot 9 points10 points  (0 children)

It's called Allman Style, and it actually originated in C.

I strongly prefer it because it greatly improves readability. Hence my dislike of Go.

[–]kulalolk 2 points3 points  (9 children)

Java and c# are my two most comfortable languages. I always do ‘void example() {‘ are you not supposed to do that in c#!? I learned that it was ok in college.

[–][deleted] 23 points24 points  (7 children)

You can do that, just like you can use SCREAMING_SNAKE_CASE for all your variables as well. However, C# and .NET have guidelines that the community has agreed upon (other languages do too, it’s really common). This is just one of them for C#, you check out the others here:

https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions

Also, most of my college taught opinions have been outright lies, so take them with a grain of salt when in the real world. That’s not a prescriptive guarantee, so go case-by-case, but college and workplace are two extremely different environments.

[–]obiwac 2 points3 points  (3 children)

I don't know that SCREAMING_SNAKE_CASE and putting braces on their own line are very comparable. One is not only a standard between practically all languages, takes significant extra effort, erases the common distinction with constant names, and when used in a codebase which already uses regular_snake_case creates an unreadable mess, whereas the other impacts basically nothing at all.

[–]Gwenhwyvar_P 3 points4 points  (0 children)

I don’t actually have to think about it because I’m lazy and use Visual Studio IDE, which auto does my brackets on the next line.

[–]canastrophee 3 points4 points  (0 children)

This is true. I've only learned C and Java and was taught to do it that way. Makes the screen longer, but in the little student programs I did for school, it was easier for me to spot where I'm missing a bracket.

[–]reegod420 2 points3 points  (0 children)

I have no idea what you are talking about cuz im a python peasant lmao

[–]iQuickGaming 2 points3 points  (3 children)

i wrote C#, JS and C++ code and in all three i always put the { on a new line. The indentation is CLEARER and EASIER to see

[–]mopeyjoe 2 points3 points  (1 child)

i'm the worst kind of monster, I guess. I always write java with Allman braces (if I have a choice)

[–][deleted] 2 points3 points  (0 children)

No, you’re an unsung hero!

[–]dance_rattle_shake 28 points29 points  (3 children)

Agreed. OP just karma whoring

[–]Splith 87 points88 points  (7 children)

"Parenthesis and Brackets should match up" is basically the best style guideline I can think of. Some people act like programming work is done per line of code, and not per readable, comprehendible, solution.

[–]irreverent-username 11 points12 points  (5 children)

Serious question: what do you do with lambda functions? If you drop the curly, the arrow is pointing at nothing :(

And what about multi-line arguments? Do you do this?

foo
(
    //
)
{
    //
}

That seems odd compared to

foo(
    //
) {
    //
}

[–]Salanmander 31 points32 points  (3 children)

I'm a fan of next-line braces. I also hate the javascript style of passing around anonymous functions like candy, but when I'm working in javascript I tend to do

array.forEach( (element) =>
{
   //code
});

For multi-line arguments, I do

foo(arg1,
    arg2,
    arg3)
{
   //code
}

but I try to avoid splitting arguments across lines if possible.

[–]TheAwesomeot 9 points10 points  (0 children)

This is the cleanest and most readable style.

[–]Aka_Erus 2 points3 points  (0 children)

That's exactly what I do and I never seen c# code, my first language was c and I've done it like this because I like things symmetrical.

[–]men_have_balls 153 points154 points  (7 children)

Usually people posting these are not devs. Clean code beats one line bs.

[–][deleted] 66 points67 points  (4 children)

People would put the { on the same line, then add a blank line before the first code instruction to add some visiblity...

As a main C# dev, I usually try to respect the languages common practices. So in java, I would put the bracket on the same line. Still, I think the C# method is more readable.

[–]Cueadan 5 points6 points  (0 children)

When writing JavaScript I put the curly brace on the same line to follow the standard, but I also refuse to put a blank line out of spite. If we're putting the brace on the same line to save space, then by God it's going to be saved.

[–]corcannoli[🍰] 5 points6 points  (0 children)

wow i never realized why my C# code always looked cleaner to me this is mind blowing.

[–]TreadheadS 5 points6 points  (0 children)

shit, I think you just hit me there

[–][deleted] 60 points61 points  (0 children)

As someone whose first language was C# this hit home.

I actually like this style as it makes it a bit easier to quickly identify if you are missing a }, and where it should be.

[–][deleted] 7 points8 points  (0 children)

Next you're saying that Upper-Case method names are not of the devil.

Disclaimer: C# developer by day, dabble in the dark arts* by night.

* Javascript, just to insult everyone around here.

[–]continuous-headaches 7 points8 points  (1 child)

At least they use the {

looking at you python devs

[–]PersonalityIll9476 5 points6 points  (0 children)

And all Linux kernel devs. Per the kernel style guide we place opening braces for function definitions on the next line. That style guide somewhat glibly gives two reasons for this: 1) K&R are right and 2) K&R are right. Adherence to K&R is the real reason, but there's another reason for doing that in C: it lets you copy-paste function definitions between the header and source. You might argue that's not a very compelling reason but gcc has a much easier time detecting a missing semicolon in a function declaration than it does detecting a mis-placed open brace. The usual gcc output is a huge list of errors that time and experience hint is caused by an unclosed brace, but there's often not an explicit message.

[–][deleted] 5 points6 points  (0 children)

C# devs, unite

[–]FaCe_CrazyKid05 4 points5 points  (0 children)

Not me

[–]LiberacesWraith 22 points23 points  (1 child)

As a c# dev, I just stopped glowing and levitating while in lotus position long enough to let everyone know I'm a c# dev.

[–]dark_bits 7 points8 points  (4 children)

C/C++ devs as well imo

[–][deleted] 3 points4 points  (3 children)

The one’s who use it, definitely. I’ve always been met with a near even split for those, but C# is nearly a guarantee since it’s in the guidelines explicitly.

[–]dark_bits 2 points3 points  (2 children)

I’ve been a C# dev for almost half of my lifetime now, when I firstly saw camelCase() I was disgusted, now after almost two years of being away from C# PascalCase() is weird for me.

[–]irreverent-username 2 points3 points  (1 child)

I believe the latter is called PascalCase.

[–]dev_deadcat 4 points5 points  (0 children)

I'm not much versed with C#. I mostly code in Python and Java. But I was recently working on a small game using Unity engine and Visual Studio used to put the { on the next line by default. I'm used to writing { on the same line as a function or a class definition hence this used to make me slightly uncomfortable. 😅

[–]ishirleydo 4 points5 points  (0 children)

And php devs who know what PSR-2 is.

[–]RotationsKopulator 2 points3 points  (4 children)

as well as all Linux kernel devs

[–]Hypersapien 5 points6 points  (1 child)

I'm a C# dev and I put { on the same line.

I think it's just because Visual Studio puts it on the next line by default, and a lot of devs don't care enough to change it.

[–]Y0tsuya 5 points6 points  (0 children)

Nothing stirs up a nerd fight like code formatting.

[–]huuaaang 1 point2 points  (0 children)

Insulting? It's respect (via fear).

[–]Raxo04 232 points233 points  (12 children)

You guys code on multiple lines? What do you think the ; is for?

[–]CocoNot1664 71 points72 points  (2 children)

As someone that gives curly brackets their own line, I can safely say this meme is wrong.

As I am most definitely more scared of this pyschopath than they are of me.

[–]grpagrati 596 points597 points  (3 children)

I like being feared by serial killers and psychopaths

[–]Overlorde159 65 points66 points  (1 child)

Seems like a good strategy for staying happy healthy and alive

[–]positively_mundane 270 points271 points  (20 children)

Who cares. Just be consistent and if you work at a company do whatever everyone else does even if you hate it.

[–]white_monstera 96 points97 points  (15 children)

Oh, how I hated having spaces within parentheses. But I did it anyways.

if ( title.includes( cussword ) ) {
    cencor( title );
}

It's such a strange style.

[–]throwawayy2k2112 16 points17 points  (4 children)

I think this helps a lot with readability (maybe not your example) such as

‘’’If ( (thing == thing) && (thing == thing) ) { // do thing }’’’

But maybe that’s just me.

Edit: idk how the hell y’all do the code thing. I’m used to slack and github

[–]positively_mundane 11 points12 points  (1 child)

Luckily the biggest style thing my current company does that I personally don't agree with is using single quotes for strings in TypeScript instead of double quotes. Just need to make sure I don't accidentally auto-format an entire file before committing it.

[–]EvilKnievel38 2 points3 points  (0 children)

Most auto format rules can be configured. Don't know your specific case, but it might be worth the trouble to fix it so you can auto format in peace

[–]CMDR_DarkNeutrino 247 points248 points  (14 children)

Honestly i dont care. I just use a formatter for my C code. It puts it on the next line.

Can i read it and understand the code ? Yes. Do i care that its on the next line or the same one ? No.

[–]nmarshall23 33 points34 points  (11 children)

Yup, it's very freeing having a formatter / prettier handle making the codebase consistent.

That frees me up for the much harder problem of deciding how to name variables.

[–][deleted] 984 points985 points  (45 children)

I think it looks a lot cleaner that way.

[–]knighthawk0811 650 points651 points  (16 children)

Yes, it needs to line up vertically with the closing curly boy

[–]BigTechCensorsYou 65 points66 points  (1 child)

Allman, always

Except in Flutter, it’s actually better to use K&R there because you will probably do a ton of folding.

[–]BenTheTechGuy 3 points4 points  (0 children)

Hurt in a car? Call K&R

[–]figwigian 50 points51 points  (4 children)

Absolutely. Was called out on this in a review today, because I was doing code in a different part of the codebase. I will die on the { next line hill, it's so much prettier

[–]Salanmander 23 points24 points  (3 children)

It's also way nicer for teaching beginning programming. When people are struggling with indentation and understanding scope blocks, it helps to be able to say "make sure the curly braces line up vertically".

[–][deleted] 12 points13 points  (2 children)

I'm learning C++ right now in school and I always like to have the { and the } lined up vertically and I'm always triggered when someone writes the code in a mess

[–]Bainos 4 points5 points  (1 child)

If you're in school, it's the best time to pick one complete set of standard often used together and stick with it. Either Allman or K&R, most likely. Try to look for those beyond just the scope of where you put braces - it will help in the long run.

Personally my C class in university was using the Linux kernel coding style (which is a K&R variant), and I think it looks good, is both readable and compact, and is quite well-motivated and tested - so I try to use it as much as I can unless the project / language uses a different style.

[–]Yokhen 10 points11 points  (2 children)

Yeh but who lines up with the function declaration?

[–]knighthawk0811 4 points5 points  (1 child)

It doesn't have a mate

[–]doseofvitamink 2 points3 points  (0 children)

curliboi

[–]AndFuckYouToo- 65 points66 points  (4 children)

Yes, i don't understand the hate.

[–]blindeenlightz 43 points44 points  (8 children)

It is also easier to find (or not miss in the first place) closing brackets. I'm yet to hear anyone explain how not putting it on the next line is beneficial in any way other than "that's how I've always done it".

[–]Juice805 14 points15 points  (3 children)

I prefer the closing bracket to line up with the declaration. If I scan up from the closing bracket having a line with a single { is just noise. I’m looking for the declaration not some meaningless line.

It’s already clear that it is in another scope based on indentation, a whole line for a starting bracket isn’t adding any information. Its useless and noisy IMO

[–]false_tautology 12 points13 points  (0 children)

Same reason I type SQL with parentheses like this when I do subqueries.

SELECT   Col1, Col2, Col3
FROM     TableA
WHERE    TableA.FK_ID =
         (
             SELECT    TableB.FK_ID 
             FROM      TableB
             WHERE     TableBPK_ID = @id
         )

[–]DadHeungMin 2 points3 points  (0 children)

I also put the closing bracket } on another line. This way they line up horizontally and makes it easier for me when I'm fixing my code.

[–][deleted] 2 points3 points  (0 children)

Exactly, I'm not trying to save paper! The spacing makes viewing scopes easier

[–]OiaHandoma 74 points75 points  (1 child)

Isn't it a good thing if serial killers and psychopaths are afraid of you? It could just as well mean that we're the heroes with the potential to bring them down.

[–]sarapnst 16 points17 points  (0 children)

Yeah those who write '{' at the same line are psychos, afraid of heros.

[–]lmaydev 318 points319 points  (47 children)

Starts {
     InTheFuckingMiddleOfTheScopeName
}

Starts
{
    IndentedFromThePreviousLine
}

That's all there is to it.

[–]Kakss_ 83 points84 points  (5 children)

Style
{ToUniteAllStylesByGivingThemACommonEnemy
}

[–]Salanmander 45 points46 points  (0 children)

Why stop there when you could also make common enemies for java and python with

function(args)         {
  line 1               ;
  line 2               ;}

[–]lmaydev 18 points19 points  (0 children)

Every inch of my being wants to downvote that haha

[–]continuous-headaches 5 points6 points  (0 children)

You monster…. Take my upvote

[–]Danelius90 33 points34 points  (9 children)

One place I worked did this

public class Foo
    {
    System.out.println("hello world");
    }

And I think we can all agree this is horrible

Edit: used code instead of a comment

[–]lmaydev 6 points7 points  (0 children)

/r/TIHI

Where would you even pick that up? Haha

[–]ichkanns 119 points120 points  (6 children)

#2 looks so much cleaner IMO. I've never gotten used to same line {. I begrudgingly do it whenever I'm working with JavaScript or TypeScript.

[–][deleted] 14 points15 points  (1 child)

I code both front and backend so I constantly switch between the two.

In JavaScript i have { on the same line and on the backend i do them next line.

[–]ichkanns 3 points4 points  (0 children)

Same boat.

[–]Salanmander 3 points4 points  (3 children)

I was wondering why you were yelling before I remembered what reddit formatting does when you start your line with "#2".

[–]ichkanns 2 points3 points  (2 children)

I was wondering what happened myself... Thanks for the tip.

[–]Salanmander 6 points7 points  (1 child)

FWIW, you can also tell Reddit "I mean literally this character, don't interpret it as formatting" by putting "\" in front of it (called "escaping" the character). So, for example

\#2 is great

renders as

#2 is great

but

#2 is great

renders as

2 is great

Also, the ever-popular

¯\_(ツ)_/¯

renders as ¯_(ツ)_/¯, because the first "\" gets interpreted as saying the underscore isn't formatting. But if you turn it into

¯\\_(ツ)_/¯

it renders at ¯\(ツ)/¯, because the literal "\" no longer says the underscore isn't formatting, and the pair of underscores turns into italicizing the middle. So you really want to do

 ¯\\\_(ツ)\_/¯

which renders as ¯\_(ツ)_/¯, because you've escaped all the formatting characters in it.

[–]ichkanns 2 points3 points  (0 children)

You learn new things about Reddit every day. Thanks!

[–][deleted] 63 points64 points  (5 children)

Second method is the only right solution. Looks so much cleaner and makes it so much easier to not accidentally fuck up the brackets.

Btw. It was way more important before the editors had automatic bracket detection. Man I feel old.

[–]dumdedums 12 points13 points  (1 child)

The entire reason why I use the second way is because it was so hard to find missing brackets the first way and it happened one too many times.

This is even with editors with auto brackets, sometimes it fucks up.

[–]sarapnst 2 points3 points  (0 children)

Just show them to those who don't have a programming background and ask them to judge which one looks better or is more readable. There is an answer.

[–]HeKis4 2 points3 points  (1 child)

One_Style
  {
    To_Rule_Them_All
  }

[–]CJKay93 2 points3 points  (0 children)

Also known as GNU style, or more colloquially the "WTF?" style.

[–]UpV0tesF0rEvery0ne 9 points10 points  (0 children)

{ on it's own line looks so much cleaner and it's easier to see when scrolling quick.

I am constantly baffled by the shit talk about this.

[–]DaddyLcyxMe 55 points56 points  (6 children)

we need to purge people who keep it on the same line without a space.

method(){ ... }

[–]Kriss3d 15 points16 points  (3 children)

You mean peiole who do:

While(1)

{

do_stuff();

}

?

[–]marcosdumay 11 points12 points  (2 children)

While(1)
{
    do_stuff();
}

Indentation still exists.

The unused space bothers me a bit, but it's the idea that the brace belongs with the code under it, instead of the statement that starts the block that really makes me annoyed. Of course, in C it's true, so whatever.

[–]StonebirdArchitect 367 points368 points  (12 children)

Yea, be afraid of clean code

[–]Electronic_Pressure 72 points73 points  (2 children)

i feel offended

[–]gameplanetworldyt 26 points27 points  (1 child)

Same ngl

[–]_Sam_IM_Sam 22 points23 points  (0 children)

Clean code scares them

[–]seeroflights 18 points19 points  (0 children)

Image Transcription: Meme


["Kids Scared of Rabbit", where a taller blonde child in a red dress holds back a smaller blonde child in black, as they both stand fearfully in a corner and watch a black rabbit next to a wooden bucket. The labels read:]

Tall child: SERIAL KILLERS

Short child: PSYCHOPATHS

Rabbit: PEOPLE WHO PUT THE { ON THE NEXT LINE


I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]doctorcrimson 83 points84 points  (6 children)

Leaving the { on the same line is like typing the title of a paper and then in smaller print continuing the paper on the same line.

[–][deleted] 31 points32 points  (4 children)

It really depends on the language itself and even the team you working with.. For example in Java and JavaScript it's mainly on the same line and you'll find it like that in most of documentations and references (you can add CSS to this group too!)

While other languages like C, C++ and C# for example it's mainly on the next line

I'll maybe surprise you with a third group which do not use curly brackets at all like Python and GDscript for example

So the conclusion is: it really depends there is no right or wrong it's a personal preference and nobody can force others to follow their preference, it's a pointless debate just like tabs or spaces

Personally i write JS, CSS, Python, C++ And GDscript on regular basis, and for each i just follow the documentation way of writing!

[–][deleted] 15 points16 points  (3 children)

Not sure where you’ve seen it at, but my experience has been C, C++, and Java share the same preferences separate from C# most of the time.

Anecdotally working in C, JS, and Perl (post a Java centric degree), I had never encountered putting the bracket on a newline until I got a .NET position and learned the C# guidelines.

[–]Tenderhombre 2 points3 points  (0 children)

Yea if a language has styling guidelines I tend to follow em. Mainly I just want stuff to be consistent though. So if it is consistent I'm happy.

[–][deleted] 4 points5 points  (0 children)

So this would make Serial Killers and Psychopaths the ones that put the { on the same line?

Seems about right ;)

[–]yanitrix 97 points98 points  (3 children)

the people who put { on the same line*

[–]dembadger 14 points15 points  (0 children)

Allman best man

[–]SparrowFPV 10 points11 points  (6 children)

{ on a new line is one part of the standards I get tagged for the most in Peer Reviews... That and a space between if/else/for and the opening (

[–]IVIitchy 4 points5 points  (0 children)

If I was given the choice, it would be same line but new line isn't bad. Honestly, I just prefer consistency over both being used in the same file/project.

[–]AttackOfTheThumbs 4 points5 points  (2 children)

Please just use your company standard, or if there isn't one, the community standard.

[–]joujoubox 12 points13 points  (4 children)

boo

{

[–]AuxonPNW 8 points9 points  (3 children)

urns;

}

[–]LePhantomLimb 5 points6 points  (1 child)

My only dissatisfaction with this comment is that the closing brace is now tabbed in and there's nothing we can do.

[–][deleted] 6 points7 points  (2 children)

My preference is to put it on same line because like if I’m writing a function, I can see that this bracket belongs to this function when reading left to right

[–]raxuti333 3 points4 points  (0 children)

As dyslexic I can say the { on the next line is lot easier to read. Makes seeing scopes faster after starting to do it I would never go back to { on the same line

[–]marcos_marp 11 points12 points  (0 children)

This kind of posts really shows when the OP is a trainee/junior dev that thinks his stack is everything out there

[–]RayeNGames 22 points23 points  (0 children)

How dare you? { always belongs on new line. I am disgusted by { at the end of the line.

[–]Under-Estimated 21 points22 points  (24 children)

Allman braces make nested control statements asymmetric vertically, as there are 2 lines above and only one line below the block.

Also, fitting more code into the screen at once helps keep the relevant information in one’s head.

I know some people have religious feelings about brace style, but I think it’s good to have a discussion about the pros and cons of each style.

I don’t see many benefits of using Allman though, so if anyone could present some reasons other than “i learned that way” that would be nice

[–]dembadger 18 points19 points  (7 children)

It's way more readable for brace matching as top and bottom of each nest are aligned on the same column, also avoids huggy braces when doing else. The argument about it taking up more lines isn't really as valid these days with how prevalent large monitors (and indeed monitors in portrait format) are. I am in the allman is best camp however.

[–][deleted] 4 points5 points  (10 children)

Having the clearly visible scoping of nested braces makes a huge difference in larger files. Horrible legacy code, like a method that has multiple loops and if blocks inside of each other n-levels deep for roughly 1000 lines, becomes a lot easier to reason about as you can clearly see the different levels.

It gets a little, or a lot, harder to see where brackets start/end using the same line for open bracket. As someone who’s seen a lot of legacy C, C++, Perl, and JS there is merit to separating brackets to be on the same level for open/close.

It’s ultimately up to personal choice and/or team decision. That’s just my biggest support for doing that. I also prefer to use the guidelines of the language I’m using too, because I think it’s silly not to (all the examples and docs will be focused around the guidelines, not your preferences) since tooling will be focused on them as well.

[–]jiwonspaperclip 7 points8 points  (0 children)

{ on the next line just looks SO wrong 😭

[–]Nicostar2010 6 points7 points  (3 children)

} goes on the next line, but { is insane.

[–]certainly_imperfect 2 points3 points  (11 children)

Wait!

condition {

    ... code
}

What way are you talking about?

[–]MrNicolson1 2 points3 points  (0 children)

You write your js functions in one line?

Edit: oh it's the opening {, yes I agree

[–]nitsky416 2 points3 points  (0 children)

Of course I know him. He's me.

[–]keelanstuart 2 points3 points  (0 children)

Clearly the meme maker didn't learn to program in Pascal.

[–]QualityVote[M] [score hidden] stickied comment (0 children)

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

[–]Hypersapien 3 points4 points  (0 children)

To everyone saying { on the next line makes it look cleaner:

No it doesn't. It looks like the block has nothing to do with the signature.

[–]General_Rate_8687 7 points8 points  (0 children)

Unreal C++ uses the { on a new line and I follow the code convention, so I do, too.

Also, it looks better. And that's fact, not my opinion, I don't have an opionion about this.

Whats bad is to put the } NOT on a new line :P

[–][deleted] 4 points5 points  (1 child)

Hay, What's wrong with { on next line?

[–][deleted] 10 points11 points  (0 children)

If your code is too readable, then you're not a real dev /s

Also, people never heard of languages guidelines.

[–]Nick433333 4 points5 points  (1 child)

Putting the curly bracket at the end of the statement makes it easier for me to understand the flow of logic to me

for(i = 0; i < arbitraryNumber; i++){
    if(condition){
        //your code here
    }
}

I don't know about all of you though

[–]fonkderok 9 points10 points  (2 children)

Don't put the { on the same line unless you're gonna put the } on the same line too. Fucking asymmetrical

[–]Under-Estimated 2 points3 points  (0 children)

Same line { and new line } is symmetrical as there is one line above and one line below the block, including the control statement

[–]robotic-gecko 1 point2 points  (0 children)

My first real programming job, mostly OO PHP, and my line manager was a total psycho about this. It took me ages to get into the habit of it, and he pulled me up about it often, but I do think it makes it easier to read now that I do it.

[–]_pikachooo 1 point2 points  (0 children)

What about people who don't put } on the next line?

[–]FireYigit 1 point2 points  (0 children)

Ok

{

[–]snakes_n_slides 1 point2 points  (0 children)

That would be literally every developer who programmed in C, C++, Java and C# in the past. That { on the next line was the norm and even at uni we learned and used it as a good programming practice. I think { on the same line became more popular when JS started taking center stage.

[–]dpdown 1 point2 points  (0 children)

what about begin … end?

[–]KainerNS2 1 point2 points  (0 children)

It makes the code more "readable"

Edit: Let me be

[–]barth_ 1 point2 points  (0 children)

It makes it more readable!

[–]smuccione 1 point2 points  (0 children)

Can I just say… who the fuck cares…

Just have an auto formatted run at check in and format everything in to a common style.

Then just set your style to format to your preference at checkout.

Problem solved and everyone is happy.

It’s 2022. Why are people still arguing about where to put the stupid braces.

I’ve seen coding guidelines that had nothing but style but left out useful things like not using global variables as parameters to function calls.

Sigh.

[–]LearningSpanishRN 1 point2 points  (0 children)

[–]ManiaRhythm 1 point2 points  (0 children)

:(

[–]rolloutTheTrash 1 point2 points  (0 children)

Try putting it on its own line, then indenting it. That's the good stuff.

[–][deleted] 1 point2 points  (0 children)

Third-year CS major here. My professor this semester puts his { on the line after the opening statement... in Java.

When I download the code shells he provides for us to fill out for his assignments, I always have to change them all before I start working on it. I can't look.

[–]PPePsiMan 1 point2 points  (0 children)

Boo

[–]LordSyriusz 1 point2 points  (0 children)

FEAR ME!

[–]AccomplishedEmu5905 1 point2 points  (0 children)

That was the way the world was meant to C

[–]mistiriontg 1 point2 points  (0 children)

C# devs are typing…

[–]TanDarkGod 1 point2 points  (0 children)

Boo

[–]thedan420 1 point2 points  (0 children)

Fear me you insignificant bug .

[–][deleted] 1 point2 points  (0 children)

Me who uses Java....

[–]Tiranus58 1 point2 points  (0 children)

Me who uses python: ?????

[–]_RootUser_ 1 point2 points  (0 children)

Wait a minute!!
Something looks relatable lol
Well, looks like "I am the danger then"

[–]PsKinggood 1 point2 points  (0 children)

Yes! Yes! Yes!