DEV Community

Discussion on: Writing Good Method & Variable Names

Collapse
 
fpuffer profile image
Frank Puffer • Edited

You write that it is a method, not a standalone function. So it belongs to an object, probably an object of type Patient. So what about calling it GetIdByChartId()? It makes no sense to put information into a name that is obvious from the context.

Collapse
 
programazing profile image
Christopher C. Johnson

Because it was a standalone function. I tend to use method and function interchangeably when I really shouldn't.