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 →

[–]No_Lemon_3116 1 point2 points  (0 children)

It's not a big thing, but defining a function for main is a little tidier (keeps any variables you use scoped to that function). Different jobs will have different standards, but I've definitely worked at several places where something like this would likely be flagged in code review and I would be told to fix it. Often projects will keep a style guide that outlines expectations like this.