Issue
bobef
bobef at nosmap-abv.bg
Fri Jul 18 02:52:37 PDT 2008
Grrr. Too bad things come down to Tango or D2, which is almost the choice to use any D library at all or D2, since most of them use Tango. This is bad situation.
Regards, bobef
Bill Baxter Wrote:
> bobef wrote:
> > Jarrett Billingsley Wrote:
> >
> >> "bobef" <bobef at nosmap-abv.bg> wrote in message
> >> news:g5o6c5$2is4$1 at digitalmars.com...
> >>> DMD 1.033:
> >>>
> >>> import tango.io.Stdout;
> >>>
> >>> void a(void delegate() dg)
> >>> {
> >>> dg();
> >>> }
> >>>
> >>> void b(char[][] bb)
> >>> {
> >>> Stdout(bb);
> >>> }
> >>>
> >>> void main(char[][] argv)
> >>> {
> >>> //why:
> >>> {Stdout(argv);}.a(); //this is not working
> >>> argv.b(); //and this is working?
> >>> }
> >> Because the "a.f() == f(a)" only works for arrays and associative arrays and
> >> not delegates.
> >>
> >>
> >
> > Obviously. And why is that? If it is working for one primitive type I see no reason it shouldn't work for the rest.
>
> It was originally just an unadvertised easter egg that it worked for any
> type at all. It was not in the spec at all for a long time, but I guess
> since the experiment seemed to be a success, Walter decided to put it in.
>
> Making it work for all types is on the to-do list for D2.0. See
> WalterAndrei.pdf from the 2007 conference. Or watch the video (!).
>
> --bb
More information about the Digitalmars-d-bugs
mailing list