Thoughts on improving operators

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Wed Oct 5 03:57:07 PDT 2011


I didn't know that was possible! Thanks!
But the case with the ternary operator is the most interesting one.

On Wed, Oct 5, 2011 at 2:54 PM, Vladimir Panteleev
<vladimir at thecybershadow.net> wrote:
> On Wed, 05 Oct 2011 13:26:26 +0300, Gor Gyolchanyan
> <gor.f.gyolchanyan at gmail.com> wrote:
>
>> Example: named foreach loops over objects:
>
> You can achieve almost exactly this by iterating over a delegate (define a
> method with the same signature as opApply). The only change at the call site
> is that instead of "foreach(ref c; ts.text)" you'll type "foreach(ref c;
> &ts.text)".
>
> --
> Best regards,
>  Vladimir                            mailto:vladimir at thecybershadow.net
>


More information about the Digitalmars-d mailing list