DEV Community

Discussion on: Writing Good Method & Variable Names

Collapse
 
itachiuchiha profile image
Itachi Uchiha

What if the class name would be ”Customer” and its method name would be ”create”.

Is it good,

Collapse
 
rachelsoderberg profile image
Rachel Soderberg

I think a case like this would actually make sense, because I assume you'd do something like Customer customer = new Customer(); to instantiate your class... then you would be doing customer.create() whenever you called that create method. I hadn't considered the combination of classes and their methods - you made a really good point! Thank you!