Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
LMagnus20636yWrong! New line, let's fight.
Actually for me it depends on the standard for the language. In JavaScript I'd have it on the same line, in C# I'd have it on a new line. -
ZioCain27116y@LynxMagnus I just hate when the editor puts the bracket on the new line. I want to be able to read as many line as possible.
-
Giocol636yI'm quite sure that most styleguides suggest putting the opening bracket in the same line, and the closing one in it's own line, but i prefer to put both in their own, separate lines. I find it way clearer
-
I do it depending on signature/number of parameters. If it’s a simple conditional or method/function, they’ll go on the same line, if it’s a large object or a method that takes several arguments, then
it (
can,
sometimes,
end,
up,
like,
this
) {
Related Rants
-
ryanmhoffman10Today I learned how to use curly braces in Python for those coming from C style programming languages. I love ...
-
highonsleep27Frontend Dev: That's not possible in Frontend, we should do it in Backend. Backend Dev: That's not possible i...
-
devios111Me, flirting with a cute girl from the finance dept. in the kitchen: "Well, back to the grind. I've got this ...
My fights with other devs always revolve around the position of curly braces:
Should they be on the same line or should they have a whole line just for themselves?
I mean, if they go on the same line you have less lines of code and you can fit more into the same view, but putting them on a new line makes it all a little less messy
rant
brackets
curly brackets
curly braces
wk112