Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ C# Java
Can someone out there please tell me what is the difference between message passing and method invocation.
Posted 25-Sep-12 5:31am
Comments
Sergey Alexandrovich Kryukov at 25-Sep-12 15:19pm
   
This is totally incorrect question, as most questions in the form "what is the difference between {0} and {1}". Isn't this obvious?
If you still did not get it, tell us the difference between apple and Apple.
--SA
Trilok Arora at 1-Oct-12 16:33pm
   
Hi Sergey,
 
Can you please explain why my answer was downvoted. It was not an incorrect answer.
 
The question asked here might be very basic but downvoting a CORRECT answer to a question needs an explaination.
 
Thanks,
Sergey Alexandrovich Kryukov at 1-Oct-12 16:59pm
   
I answered, please see below.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Method Invocation is when you give a call to method
Message Passing is passing objects as parameters (to a method)
 
class A
{
    public void Method(Object obj)
    {
        // Method does somthing
    }
}
 
class B
{
    Object obj1 = new Object();
 
    A a = new A();
    a.Method1(obj1);
}
 
 
In the above example a.Method1() is Method invocation
passing parameter (obj1) to Method1 is message passing
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 1-Oct-12 16:59pm
   
Trilok,
 
The problem is that the question is totally incorrect, and you failed to indicate it, hence all further problems. What you show here is the parameter passing, and not "message passing", at least in .NET. Yes, in some contexts, the calls similar to what you show are called "sending messages", but the whole invocation is considered a message, not just the parameter. Basically, what we call a call of a method, could be called "sending a message", pretty much like in Smalltalk. In some other contexts, the parameter can represent a message. So, I don't really see anything "CORRECT" in this answer.
 
If you want to see how some correct answers look, just look around this forum. There are very many of them.
 
I'm really sorry that my feedback is that negative, but the truth is the most important thing, isn't it? Besides, when somebody explain me my mistakes, I try to fix them and improve myself. I hope I'm helping you to do the same... :-)
 
Cheers,
--SA
Trilok Arora at 2-Oct-12 14:05pm
   
Well, If I just read the reply you posted to me, then it is a very valid question asked initially.
 

You are just contradicting yourself... SORRY!!!
Sergey Alexandrovich Kryukov at 2-Oct-12 14:10pm
   
I cannot see the contradiction, excuse me, what is that?
--SA
Trilok Arora at 2-Oct-12 14:24pm
   
Read the line posted by you
 

' Basically, what we call a call of a method, could be called "sending a message" '
 

The above line contrdicts with you post earlier
 

' This is totally incorrect question, as most questions in the form "what is the difference between {0} and {1}". Isn't this obvious? '
Sergey Alexandrovich Kryukov at 2-Oct-12 15:07pm
   
Tho two my statements are unrelated, and I'm sure they are correct.
And yes, the question is totally incorrect. Do I have to explain it?
 
The notion of "difference" is just a figure of speech having no exact meaning. It makes sense in very casual conversation and only when the "compared" entities are of the same semantic layer and have a lot in common. For example, one can ask "what's the different between this and that engine" makes sense, but only most features are common. And "what is the difference between Titanic and navigation" makes no sense whatsoever; and this is how OP's question looks.
 
And you, too...
Unfortunately, not just your answer, but even more your objections demonstrates so considerable lack of judgement, that I don't know how to apply logical arguments in the dialog with you. So, I'm really sorry, but I don't want to loose your time for further discussion.
 
Thank you very much,
--SA
Trilok Arora at 2-Oct-12 15:30pm
   
All I are trying to say is that you are contradicting yourself in the same post. I very well pointed it out but you do not want anyone point out your own mistake.
 

Anyways there is no point debating with a person who cannot accept criticism.
 

and Yes even I don't want to loose your time for further discussion.Thanks,
Sergey Alexandrovich Kryukov at 2-Oct-12 16:08pm
   
Please, don't fantasize. Let's stop it now.
Thanks.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CPallini 480
1 Sergey Alexandrovich Kryukov 335
2 OriginalGriff 285
3 George Jonsson 246
4 Gihan Liyanage 235
0 OriginalGriff 4,873
1 CPallini 3,900
2 Sergey Alexandrovich Kryukov 3,474
3 George Jonsson 2,646
4 Gihan Liyanage 2,236


Advertise | Privacy | Mobile
Web02 | 2.8.140905.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100