Even after rereading my post I hardly see how you could believe I was saying a function and a method are the same to me. I just said that you could technically use only methods as SSwift suggests, but I also implied it wouldn't make much sense.
I know I'm not often crystal clear, but here you'll make me paranoid about the crazy difference between what I say and what people understand.
An additional note: yes, function and methods are actually far closer than what you imply. Saying that a method can't be called on anything other than an object is true, but not enough. Because similarly a function taking an object parameter can't be called with a parameter that would be anything other than an (compatible) object. That's really the same thing here.
The real *BIG* difference is the ability to override a method, which is pretty much what OO is all about. And this ability is what makes the object you apply the method to such a particular (hidden and implcit) parameter. Here lies the very important difference to me.
Of course, that's the technical side of thing. From an OO programmer's view point it's healthier to really think in terms of objects, and "feel" methods as an operation that "belongs" to the type.
I know I'm not often crystal clear, but here you'll make me paranoid about the crazy difference between what I say and what people understand.
An additional note: yes, function and methods are actually far closer than what you imply. Saying that a method can't be called on anything other than an object is true, but not enough. Because similarly a function taking an object parameter can't be called with a parameter that would be anything other than an (compatible) object. That's really the same thing here.
The real *BIG* difference is the ability to override a method, which is pretty much what OO is all about. And this ability is what makes the object you apply the method to such a particular (hidden and implcit) parameter. Here lies the very important difference to me.
Of course, that's the technical side of thing. From an OO programmer's view point it's healthier to really think in terms of objects, and "feel" methods as an operation that "belongs" to the type.