Feature Request: Implicit first parameter inside scope expression.

Jarrett Billingsley kb3ctd2 at yahoo.com
Sun Nov 4 07:59:38 PST 2007


"downs" <default_357-line at yahoo.de> wrote in message 
news:fghshq$61i$1 at digitalmars.com...
> 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?

It's a very downs-esque feature.  Use perl. 





More information about the Digitalmars-d mailing list