I know:
C ++, Java, etc. others:
object.method() , object.method(arg)
Objective-C:
[object method] , [object method:arg]
Smalltalk:
object method , object method: arg
PHP, Perl
object->method(), object->method(arg)
$object->method;
$object->method($arg1, $arg2, ...);
OCaml
object#method , object#method args
CLOS
(method object) , (method object arg)
And even, I used:
method object
method(object)
Can you name other alternative ways to send a message to an object (I think this is the right term) in different programming languages?
source
share