|
Posted by Jerry Stuckle on 10/26/77 11:51
Tony Marston wrote:
>
>
> There is nothing special with messaging. It's a piece of code calling a
> function, which has existed in many non-OO languages for decades. There is
> no difference between calling a function and calling a method (function)
> within an object.
>
> OOP is about encapsulation, inheritance and polymorhism, and the ability to
> create objects from classes. It is taken for granted that there is a method
> of communicating with each of the objets ou create. There is nothing special
> about "messaging" at all.
>
Well, the fact is, messages (function calls) are OPTIONAL in other languages.
You can build a C program without any functions (other than main()). You can
build an assembler program with no subroutines.
But OO *REQUIRES* messages.
>
>>However, wikipedia (which I also mentioned because it might meet your
>>level of intelligence), says under "Fundamental Concepts":
>>
>>"Method (also known as message) — how code can use an object of some
>>class. A method is a form of subroutine operating on a single object
>
>
> Other languages have had the ability to create subroutines, and to be able
> to call those subrutines, for ages. There is nothing special about that
> which only eists in OOP.
>
Sure, they *HAVE THE ABILITY*. In OO, you *MUST CREATE THEM*.
>
>>. Methods may be divided into queries returning the current state and
>>commands changing it:
>
>
> Other langages have had the ability for a module to have several entry
> points, and for each entry point to do something different, for decades.
> There is nothing special about his technique which is unique to OOP,
> therefore saying that it is a fundamental priciple of OOP is entirely
> misleading. AFAIAC it is a fundamental requirement of EVERY language, OO and
> non-OO, to be able to call one module from another. This is a standard
> requirement, there is nothing special aout it at all.
>
You just don't seem to understand the difference between *HAVING THE ABILITY*
and *REQUIRING* something.
>
>>a Dog could have a query Age to say how old it is, and command chase
>>(Rabbit target) to start it chasing a rabbit. A method may also do both,
>>but some authorities (e.g. Bertrand Meyer) recommend they be kept
>>separate. Sometimes access to the data of an object is restricted to the
>>methods of its class."
>>
>>It is important because that's how you communicate with objects. It's the
>>interface, which is public, instead of the implementation, which is
>>private.
>
>
> Calling a function and passing parameters to it, and getting parameters
> back, is not something which is unique to OO. It is a standard feature of
> EVERY language, therefore to say that it is a fundamental principle of OOP
> carries no more weight than saying the ability to declare variables is a
> fundamental principle of OOP. It is oneof those obvious things which should
> not have to be stated.
>
Sure it's a fundamental principal. Because OO *REQUIRES IT*.
>
>>But if you understood OO as well as you claim you would understand that.
>
>
> The difference between an OO and a non-OO language is that one has
> encapsulation, inheritance and polymorphism while the other does not. Both
> have messaging (the ability to call functions) so that is a complete red
> herring.
>
And OO *REQUIRES* message passing. Non-OO languages do not.
You really ARE dense, aren't you?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|