[Tutor] OO terms and definitions
Mon, 10 Dec 2001 11:24:55 -0000
> Pragmatically they are the same.
Umm no, there are significant differences. We get regular cries
for help from beginners who have defined a function when they
meant to define a method! (ie they missed out self...)
> The Java community likes to call them "methods". The C/C++ community
> calls them functions (whether they are in a class or not).
They shouldn''t - its supposed to be "member functions" when
in a class and plain "functions" when outside.
ie "member function" == "method"
> community calls the ones that modify state but don't return a value
As does the Algol, ADA, Pascal and VB communities(actually VB
uses SUBroutine for procedure) Procedure is a commonly used term
for a subroutine that does not return a value.
> You can pretty much use the terms interchangeably, except when you get
> into the semantic details of "function" vs. "unbound method" vs.
> "bound method".
But only if you want to perpetuate the confusion that caused
the poster to ask the question! Its much better for everyone
if we all use the terms correctly IMO!