• Post Reply Bookmark Topic Watch Topic
  • New Topic

Etymology of the Term "Method"  RSS feed

 
Louis Denning
Ranch Hand
Posts: 64
4
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We all know that member functions are called methods, but why is it that they're called "methods"? From where did the term originate?

Is because objects have their own way of doing things (i.e. behaviour), so one could say that they have their own "methods" or something?
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Difficult to be certain. There are traditional names for different types of method, which were called routines or subroutines 50 years ago. You can have procedures, which return nothing, or functions which return something. A mathematician will interpret a function as something which always returns the same value for the sam inputs. So maybe Gosling et al chose a new term to try and separate themselves from the old conventions.

Only the people who originally designed Java® can really answer that question.
 
Stephan van Hulst
Saloon Keeper
Posts: 7987
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a cow Louis, this is a truly great question. I'll be trawling the innertubes for a few days to get the answer.
 
Randall Twede
Ranch Hand
Posts: 4696
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its called a method because its not a function ;^)

functions are autonomous.

that's all I know.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!