[589] in Coldmud discussion meeting

root meeting help first previous next last

non-object method calls

daemon@ATHENA.MIT.EDU (Thu Nov 17 19:21:22 1994 )

From: deforest@netcom.com (Robert de Forest)
To: coldstuff@MIT.EDU
Date: Thu, 17 Nov 1994 16:11:12 -0800 (PST)

Brandon reminded me to send documentation on the new behavior of the method
 call operator, ".".

For a piece of data x with a type other than 'dbref or 'frob,

x.y(z...);

Is syntactically equivalent to

get_name(type(x)).y(x, z...);

That is,

1.foo() => $integer.foo(1);
"foo".add("bar") => $string.add("foo","bar");
#[['george, ['thelma]]].add_elem('george, 'ethyl) =>
 $dictionary.add_elem(#[['geourge, ['thelma]]], 'george, 'ethyl);

etc.

Crag / Robert