Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Raspik don't be that guy :D it is annoying to use prefixed methods, there are already private
-
boussi428ymy_function() all the way baby.
(not really though, also depends on the language and its conventions) -
yusijs12508yGenerally camel case, but for classes i often use MyFunction, and always prefix private with _ because reasons.
-
Totally depends on the language - option 3 for functions in php and ruby, option 2 for functions in javascript, swift, objc. Also using option 1 for class naming everywhere.
-
@Fixxel isn't coupling your variable names to their types a bad idea? What if your int needs changed to a long or decimal? What if an array is changed to a list? What benefit do you see from doing this?
Which one are you ?
MyFunction()
myFunction()
my_function()
Myfunction()
undefined