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
-
I dig it cuz All Might...but it depends man. Some lang standards require one over the other. Java and C# for example use one over the other.
-
Why it's a villan choice?
I actually follow the first one but one of my project have l8nting rules as second one. I never felt the difference. -
But heres the thing only villians always think they r the good guys
The good guys sometimes question there "goodness" -
SomeNone7115yOr use a transpiler, e.g. Fable for transpiling F# to JS, then you can write:
fun fname param1 param2 =
whatever the code . . .
No brackets means no question as to where they go!
Edit: Darnit, the second line is supposed to go intented below the first, and DevRant doesn't show it that way… -
TobiSGD2815y@Pogromist Given that Go counts to the C-family languages, but enforces the first style: No.
-
Whatever, I just let refmt do the job. Life's too short to discuss about what the right bracket or indentation style is.
-
Patterns and consistency are more important than form.
I don't care about nice brackets when the project is either underengineered 5000-line classes, or overabstracted unreadable layers of unnecessary adapters and wrappers.
You can use 3 spaces of indentation throughout the project for all I care, if it's consistent, and the code is structured in a logical way.
5-15 lines per function, 5-15 functions per class, DRY but not overgeneralized for hypothetical scenarios, etc. -
Depends on what language you're working with.
Java uses hero style
C++ uses villain style
Related Rants
I am a Hero and You?
Just for fun 😂😂
joke/meme
javascript
coding
programming
js