On Mon, May 10, 2010 at 7:44 PM, Masahiro Nakagawa <[email protected]> wrote: > On Mon, 10 May 2010 21:32:00 +0900, Denis <[email protected]> wrote: > >> 2) You could probably use __dollar for ignored elements, to prevent >> namespace pollution and symbol conflicts: >> tie(a, $) = tuple(1, 2); // a = 1 > > I don't understand this. Please show me example. > I tried following code with dmd 2.046 beta: > ----- > import std.stdio; > > struct Dollar {} > __gshared Dollar __dollar; > > void main() > { > writeln($); > } > > // foo.d(8): '$' is valid only inside [] of index or slice > ----- > Umm... >
My bad, it is indeed disallowed outside of opSlice. Didn't know that. _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
