Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Sending messages to expressions

14 views
Skip to first unread message
Message has been deleted

Dmitry A. Kazakov

unread,
Mar 9, 2013, 5:07:49 PM3/9/13
to
On 9 Mar 2013 20:23:20 GMT, Stefan Ram wrote:

> I'd say that a message was send to an /expression/, not to an
> object. This is also what makes up polymorphism. For example, in
>
> e.m()
>
> (Java syntax), the message m() is sent to e, whose value
> (object) (and run-time type) WE DO NOT KNOW.

[...]

> What do you think about this?

"Sending message" is a part of expression evaluation

"message" = operation
"sending" = call

Any expression consists of operations applied to/called on operands.
Operands can be expressions. There is nothing beyond that.

The type is always known, if the language is typed, which the definition of
being typed.

The specific type might be unknown (the type determining the body
ultimately selected through dispatch), but the type of the object 'e' of an
operation 'm' is statically known. This is how the compiler knows that 'm'
can be applied to 'e' [= does not give compile-time error]. The type of 'e'
is a closure of all descendants of some root type for which 'm' was
declared as an operation. Or, equivalently, the type for which 'm' is an
operation. All this is a tautology of being typed.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
0 new messages