Type indication is primarily useful as a hint to the resolver, which would otherwise not be able to decide upon the type of an expression. TOM does not provide an explicit type indication syntax, since there are other, quite obvious, means to achieve the same effect.
Suppose the existence of two methods with the same argument types and which differ only in their return type, such as
int foo; float foo;
Invoking [a foo]
in an empty context will not be resolvable since
it can not be decided which message to actually send. However,
replacing this invocation by the following expression obviously solves
the problem by providing an explicit, single type, context.
{float x = [a foo]}
Go to the first, previous, next, last section, table of contents.