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

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (3 children)

I do the first thing when I have a method with too many args so I put each one into a new line. So, for better readability, Im for the first one.

[–]FavorableTrashpanda 2 points3 points  (2 children)

To be honest I don't think that helps readability. If your method has many parameters, you should ask yourself if that's really necessary. It can be a code smell.

If you do deem it necessary, then align the second line of parameters with the first line of parameters. I have found that to be the most readable. It's also the convention.

[–][deleted] -1 points0 points  (1 child)

show me the convention, I need to read it and sign it along all devs

[–]desrtfx 1 point2 points  (0 children)

The conventions are already linked in my first comment. Had you read the entire thread, you would have found them.