DEV Community

Muhammad Faran Aiki
Muhammad Faran Aiki

Posted on

Why I prefer this style

I prefer,

#include <stdio.h>

int main() {
  printf("I prefer this");
}
Enter fullscreen mode Exit fullscreen mode

More than this

#include <stdio.h>

int main()
{
  printf("I do not prefer this");
}
Enter fullscreen mode Exit fullscreen mode

Because the line is less than the previous. Note, that I did not mention the size is lesser than the previous, they both are the same size.
But of course, it is up to the developer, coder, or the programmer to decide which style they use. I was just sharing my opinion.

Oldest comments (2)

Collapse
 
sandordargo profile image
Sandor Dargo

Just a small comment.

But of course, it is up to the developer, coder, or the programmer to decide which style they use.

That should be true only for personal projects. In any team efforts, it should be either the team or the tech lead to decide on the style and no matter what your preferences are, you use the team conventions.

Of course, the best is if you can enforce it in the pipeline / version control.

Collapse
 
faranaiki profile image
Muhammad Faran Aiki • Edited

I am sorry, I forgot to include that. Maybe because I never do what you just have said; I always program a program for fun, since I do not work as a programmer; rather, I am still a student.
Edit:
Thanks for mentioning that.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.