Feature Request: Implicit first parameter inside scope expression.

downs default_357-line at yahoo.de
Sat Nov 3 06:18:13 PDT 2007


First, a definition.
	A CallableThing shall be either a function, functor, method, delegate,
function pointer or anything else that supports the foo(parameters) syntax.

Requested feature:
	When inside an index or scope expression, and a CallableThing is called
with an invalid number or type of parameters, before failing, try to
call the Thing in question with the object the index or scope belongs to
as the first parameter.

What this allows (example):
	string foo="I can see you";
	string bar=foo[find("can")+3..find("you")]; // " see "

What this breaks:
	Nothing, as it is only triggered in situations which would be an error
under the current rules.

What do you think?
 --downs



More information about the Digitalmars-d mailing list