Jump to content

What's the best naming convention for functions


drtanz

Recommended Posts

As salathe said as long as it is clear. Depends on your audience too. I prefer underscores, just because I can pick them out quickly is all though. Then again I tend to try to make it look cleaner at times with using underscores for variables and then camelCode for my functions, especially if intended for someone else to look at my code just to make it easier to read.

CheckInput()

CheckVars()

CheckCheck()

 

Just gets old to me. Underscores are great for pseudo-catagorization

 

check_input_length()

check_input_parameters()

session_set()

session_remove()

display_integer()

dispay_formatted()

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.