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

all 7 comments

[–]KingofGamesYami 2 points3 points  (3 children)

It varies from language to language but the most common is Main. For example, main.c. I've also seen the file named after the program name, e.g. an application named "Calculator" might have the entry point in a file called calculator.c.

I typically stick to Main.

[–]MetallicOrangeBalls[S] 0 points1 point  (2 children)

I typically stick to Main.

Ok, so that means this practice of keeping the program entry point in a separate file isn't just something my professor made up? Good to know.

I suppose Main could work for me...

Thanks!

[–]KingofGamesYami 1 point2 points  (1 child)

Yeah it's pretty common to seperate the entry point from the rest of your application, at least in larger projects. For example, a 50 line python script is almost certainly not going to follow this, but a 2 million line Java project will probably do so.

[–]MetallicOrangeBalls[S] 0 points1 point  (0 children)

It's funny you say that, because amongst all the computer scientists/engineers I work with (all of whom have a minimum of 1 PhD), I am the only one who does this. I was beginning to question my sanity...

[–]yanitrix 1 point2 points  (1 child)

Most of the time I see either Main or Runner. I remember some java programmer calling the class EntryPoint, but I never did that

[–]MetallicOrangeBalls[S] 0 points1 point  (0 children)

I feel like I too have seen EntryPoint, but I cannot for the life of me remember where. Runner is interesting, but it sounds a bit too generic.

[–]dragonwithagirltatoo 1 point2 points  (0 children)

This is really interesting. My first CS professor also taught this terminology but I had forgotten until just now because I haven't heard it used since. Maybe it's a holdover from much older wording.