diff -uNr dmd-0.165/dmd/html/d/changelog.html dmd-0.166/dmd/html/d/changelog.html --- dmd-0.165/dmd/html/d/changelog.html 2006-08-20 17:04:34.000000000 +0200 +++ dmd-0.166/dmd/html/d/changelog.html 2006-08-31 11:11:04.000000000 +0200 @@ -32,7 +32,7 @@ -
- Functions with non-D linkage cannot be virtual, and hence cannot be overridden. + Functions with non-D linkage cannot be virtual, and hence cannot be + overridden. +
+ + Member template functions cannot be virtual, and hence cannot be + overridden.
Functions marked as final may not be overridden in a
@@ -363,8 +368,8 @@
Function Parameters
- Parameters are in, out, or inout.
- in is the default; out and inout work like
+ Parameters are in, out, inout or lazy.
+ in is the default; the others work like
storage classes. For example:
int foo(int x, out int y, inout int z, int q); @@ -401,6 +406,32 @@ // bar is now 0+
Lazy arguments are evaluated not when the function is called, + but when the parameter is evaluated within the function. Hence, + a lazy argument can be executed 0 or more times. A lazy parameter + cannot be an lvalue.
+ +void dotimes(int n, lazy void exp) +{ + while (n--) + exp(); +} + +void test() +{ int x; + dotimes(3, writefln(x++)); +} ++ +
prints to the console:
+ +0 +1 +2 ++ +
A lazy parameter of type void can accept an argument + of any type.
If the variadic parameter is an array of delegates + with no parameters: +
+ +void foo(int delegate()[] dgs ...); ++ +
Then each of the arguments whose type does not match that + of the delegate is converted to a delegate. +
+ +int delegate[] dg; +foo(1, 3+x, dg, cast(int delegate[])null); ++ +
is the same as:
+ +foo( { return 1; }, { return 3+x; }, dg, null ); ++
A robust solution would be a way to do lazy evaluation of function parameters. Such a way -is possible in the D programming language using a delegate for the parameter: +is possible in the D programming language using a delegate parameter:
void log(char[] delegate() dg) @@ -293,10 +292,19 @@ (suggested by Andrei Alexandrescu). Any expression can be implicitly converted to a delegate that returns either void or -the type of the expression. The foo function then becomes: +the type of the expression. +The delegate declaration is replaced by the lazy storage class +(suggested by Tomasz Stachowiak). +The functions then become: -void foo(int i) +void log(lazy char[] dg) +{ + if (logging) + fwritefln(logfile, dg()); +} + +void foo(int i) { log("Entering foo() with i set to " ~ toString(i)); } @@ -325,7 +333,7 @@This pattern can be encapsulated in a function using lazy evaluation:
-void dotimes(int count, void delegate() exp) +void dotimes(int count, lazy void exp) { for (int i = 0; i < count; i++) exp(); @@ -352,7 +360,7 @@ Here's a method to create a switch like structure: -bool scase(bool b, void delegate() dg) +bool scase(bool b, lazy void dg) { if (b) { dg(); @@ -361,6 +369,9 @@ return false; } +/* Here the variadic arguments are converted to delegates in this + special case. + */ void cond(bool delegate()[] cases ...) { foreach (c; cases) @@ -416,10 +427,10 @@ function: -Abc Enforce(Abc p, msg) +-Abc Enforce(Abc p, lazy char[] msg) { if (!p) - throw new Exception(msg); + throw new Exception(msg()); return p; }@@ -434,10 +445,10 @@ template function: -T Enforce(T)(T p, msg) ++T Enforce(T)(T p, lazy char[] msg) { if (!p) - throw new Exception(msg); + throw new Exception(msg()); return p; }@@ -454,6 +465,10 @@I gratefully acknowledge the inspiration and assistance of Andrei Alexandrescu, Bartosz Milewski, and David Held. + The D community helped a lot with much constructive + criticism, such as the thread starting with + Tomasz Stachowiak in D/41633 +.
@@ -482,7 +497,6 @@ Copyright © 1999-2006 by Digital Mars, All Rights Reserved | Page generated by Ddoc. | Comments diff -uNr dmd-0.165/dmd/html/d/lex.html dmd-0.166/dmd/html/d/lex.html --- dmd-0.165/dmd/html/d/lex.html 2006-08-20 17:04:34.000000000 +0200 +++ dmd-0.166/dmd/html/d/lex.html 2006-08-30 02:27:02.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Sun Aug 20 17:04:32 2006 +@@ -986,6 +986,7 @@ ireal is + lazy long mixin diff -uNr dmd-0.165/dmd/html/d/phobos/object.html dmd-0.166/dmd/html/d/phobos/object.html --- dmd-0.165/dmd/html/d/phobos/object.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/object.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Wed Aug 30 02:27:01 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/phobos.html dmd-0.166/dmd/html/d/phobos/phobos.html --- dmd-0.165/dmd/html/d/phobos/phobos.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/phobos.html 2006-08-31 11:08:32.000000000 +0200 @@ -29,7 +29,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_base64.html dmd-0.166/dmd/html/d/phobos/std_base64.html --- dmd-0.165/dmd/html/d/phobos/std_base64.html 2006-08-20 17:01:26.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_base64.html 2006-08-31 11:08:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:25 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_bitarray.html dmd-0.166/dmd/html/d/phobos/std_bitarray.html --- dmd-0.165/dmd/html/d/phobos/std_bitarray.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_bitarray.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:27 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_boxer.html dmd-0.166/dmd/html/d/phobos/std_boxer.html --- dmd-0.165/dmd/html/d/phobos/std_boxer.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_boxer.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_fenv.html dmd-0.166/dmd/html/d/phobos/std_c_fenv.html --- dmd-0.165/dmd/html/d/phobos/std_c_fenv.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_fenv.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_math.html dmd-0.166/dmd/html/d/phobos/std_c_math.html --- dmd-0.165/dmd/html/d/phobos/std_c_math.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_math.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_compiler.html dmd-0.166/dmd/html/d/phobos/std_compiler.html --- dmd-0.165/dmd/html/d/phobos/std_compiler.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_compiler.html 2006-08-31 11:08:30.000000000 +0200 @@ -32,7 +32,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_conv.html dmd-0.166/dmd/html/d/phobos/std_conv.html --- dmd-0.165/dmd/html/d/phobos/std_conv.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_conv.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_cover.html dmd-0.166/dmd/html/d/phobos/std_cover.html --- dmd-0.165/dmd/html/d/phobos/std_cover.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_cover.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_process.html dmd-0.166/dmd/html/d/phobos/std_c_process.html --- dmd-0.165/dmd/html/d/phobos/std_c_process.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_process.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_stdarg.html dmd-0.166/dmd/html/d/phobos/std_c_stdarg.html --- dmd-0.165/dmd/html/d/phobos/std_c_stdarg.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_stdarg.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_stddef.html dmd-0.166/dmd/html/d/phobos/std_c_stddef.html --- dmd-0.165/dmd/html/d/phobos/std_c_stddef.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_stddef.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_stdio.html dmd-0.166/dmd/html/d/phobos/std_c_stdio.html --- dmd-0.165/dmd/html/d/phobos/std_c_stdio.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_stdio.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_stdlib.html dmd-0.166/dmd/html/d/phobos/std_c_stdlib.html --- dmd-0.165/dmd/html/d/phobos/std_c_stdlib.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_stdlib.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_cstream.html dmd-0.166/dmd/html/d/phobos/std_cstream.html --- dmd-0.165/dmd/html/d/phobos/std_cstream.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_cstream.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_string.html dmd-0.166/dmd/html/d/phobos/std_c_string.html --- dmd-0.165/dmd/html/d/phobos/std_c_string.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_string.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_time.html dmd-0.166/dmd/html/d/phobos/std_c_time.html --- dmd-0.165/dmd/html/d/phobos/std_c_time.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_time.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_ctype.html dmd-0.166/dmd/html/d/phobos/std_ctype.html --- dmd-0.165/dmd/html/d/phobos/std_ctype.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_ctype.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_c_wcharh.html dmd-0.166/dmd/html/d/phobos/std_c_wcharh.html --- dmd-0.165/dmd/html/d/phobos/std_c_wcharh.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_c_wcharh.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_date.html dmd-0.166/dmd/html/d/phobos/std_date.html --- dmd-0.165/dmd/html/d/phobos/std_date.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_date.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_demangle.html dmd-0.166/dmd/html/d/phobos/std_demangle.html --- dmd-0.165/dmd/html/d/phobos/std_demangle.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_demangle.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_file.html dmd-0.166/dmd/html/d/phobos/std_file.html --- dmd-0.165/dmd/html/d/phobos/std_file.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_file.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_format.html dmd-0.166/dmd/html/d/phobos/std_format.html --- dmd-0.165/dmd/html/d/phobos/std_format.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_format.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_gc.html dmd-0.166/dmd/html/d/phobos/std_gc.html --- dmd-0.165/dmd/html/d/phobos/std_gc.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_gc.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_intrinsic.html dmd-0.166/dmd/html/d/phobos/std_intrinsic.html --- dmd-0.165/dmd/html/d/phobos/std_intrinsic.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_intrinsic.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_math.html dmd-0.166/dmd/html/d/phobos/std_math.html --- dmd-0.165/dmd/html/d/phobos/std_math.html 2006-08-20 17:01:26.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_math.html 2006-08-31 11:08:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:25 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_md5.html dmd-0.166/dmd/html/d/phobos/std_md5.html --- dmd-0.165/dmd/html/d/phobos/std_md5.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_md5.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:26 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_mmfile.html dmd-0.166/dmd/html/d/phobos/std_mmfile.html --- dmd-0.165/dmd/html/d/phobos/std_mmfile.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_mmfile.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_openrj.html dmd-0.166/dmd/html/d/phobos/std_openrj.html --- dmd-0.165/dmd/html/d/phobos/std_openrj.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_openrj.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_outbuffer.html dmd-0.166/dmd/html/d/phobos/std_outbuffer.html --- dmd-0.165/dmd/html/d/phobos/std_outbuffer.html 2006-08-20 17:01:26.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_outbuffer.html 2006-08-31 11:08:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:29 2006Last update Sun Aug 20 17:01:25 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_path.html dmd-0.166/dmd/html/d/phobos/std_path.html --- dmd-0.165/dmd/html/d/phobos/std_path.html 2006-08-20 17:01:26.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_path.html 2006-08-31 11:08:26.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:26 2006Last update Sun Aug 20 17:01:24 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_process.html dmd-0.166/dmd/html/d/phobos/std_process.html --- dmd-0.165/dmd/html/d/phobos/std_process.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_process.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:25 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_random.html dmd-0.166/dmd/html/d/phobos/std_random.html --- dmd-0.165/dmd/html/d/phobos/std_random.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_random.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_regexp.html dmd-0.166/dmd/html/d/phobos/std_regexp.html --- dmd-0.165/dmd/html/d/phobos/std_regexp.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_regexp.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_socket.html dmd-0.166/dmd/html/d/phobos/std_socket.html --- dmd-0.165/dmd/html/d/phobos/std_socket.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_socket.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_socketstream.html dmd-0.166/dmd/html/d/phobos/std_socketstream.html --- dmd-0.165/dmd/html/d/phobos/std_socketstream.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_socketstream.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_stdint.html dmd-0.166/dmd/html/d/phobos/std_stdint.html --- dmd-0.165/dmd/html/d/phobos/std_stdint.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_stdint.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:27 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_stdio.html dmd-0.166/dmd/html/d/phobos/std_stdio.html --- dmd-0.165/dmd/html/d/phobos/std_stdio.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_stdio.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_stream.html dmd-0.166/dmd/html/d/phobos/std_stream.html --- dmd-0.165/dmd/html/d/phobos/std_stream.html 2006-08-20 17:01:26.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_stream.html 2006-08-31 11:08:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:25 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_string.html dmd-0.166/dmd/html/d/phobos/std_string.html --- dmd-0.165/dmd/html/d/phobos/std_string.html 2006-08-20 17:01:26.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_string.html 2006-08-31 11:08:28.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:27 2006Last update Sun Aug 20 17:01:25 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_system.html dmd-0.166/dmd/html/d/phobos/std_system.html --- dmd-0.165/dmd/html/d/phobos/std_system.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_system.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:27 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_thread.html dmd-0.166/dmd/html/d/phobos/std_thread.html --- dmd-0.165/dmd/html/d/phobos/std_thread.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_thread.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_uni.html dmd-0.166/dmd/html/d/phobos/std_uni.html --- dmd-0.165/dmd/html/d/phobos/std_uni.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_uni.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_uri.html dmd-0.166/dmd/html/d/phobos/std_uri.html --- dmd-0.165/dmd/html/d/phobos/std_uri.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_uri.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:30 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_utf.html dmd-0.166/dmd/html/d/phobos/std_utf.html --- dmd-0.165/dmd/html/d/phobos/std_utf.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_utf.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_windows_charset.html dmd-0.166/dmd/html/d/phobos/std_windows_charset.html --- dmd-0.165/dmd/html/d/phobos/std_windows_charset.html 2006-08-20 17:01:30.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_windows_charset.html 2006-08-31 11:08:32.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:28 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_zip.html dmd-0.166/dmd/html/d/phobos/std_zip.html --- dmd-0.165/dmd/html/d/phobos/std_zip.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_zip.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:31 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/phobos/std_zlib.html dmd-0.166/dmd/html/d/phobos/std_zlib.html --- dmd-0.165/dmd/html/d/phobos/std_zlib.html 2006-08-20 17:01:28.000000000 +0200 +++ dmd-0.166/dmd/html/d/phobos/std_zlib.html 2006-08-31 11:08:30.000000000 +0200 @@ -28,7 +28,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:01:26 2006 +diff -uNr dmd-0.165/dmd/html/d/templates-revisited.html dmd-0.166/dmd/html/d/templates-revisited.html --- dmd-0.165/dmd/html/d/templates-revisited.html 2006-08-20 17:04:34.000000000 +0200 +++ dmd-0.166/dmd/html/d/templates-revisited.html 2006-08-30 02:27:04.000000000 +0200 @@ -33,7 +33,7 @@ -Last update Thu Aug 31 11:08:28 2006Last update Sun Aug 20 17:04:33 2006 +@@ -1256,6 +1256,13 @@ }Last update Wed Aug 30 02:27:02 2006More Template Metaprogramming
+ ++
- Tomasz Stachowiak's compile time raytracer.
+ +- Don Clugston's compile time 99 Bottles of Beer.
+References
[1] D programming language, diff -uNr dmd-0.165/dmd/html/d/type.html dmd-0.166/dmd/html/d/type.html --- dmd-0.165/dmd/html/d/type.html 2006-08-20 17:04:34.000000000 +0200 +++ dmd-0.166/dmd/html/d/type.html 2006-08-30 22:05:00.000000000 +0200 @@ -32,7 +32,7 @@ -
Last update Sun Aug 20 17:04:32 2006 +@@ -387,50 +387,6 @@ dg(3); // call o.member(3)Last update Wed Aug 30 22:04:58 2006Implicit Conversion To Delegates
- -An expression exp of type T can be implicitly converted - to a delegate of type Q delegate(), and such - is considered an exact match for overloading purposes - if T exactly matches Q, and a conversion match - if T can be implicitly converted to Q. - An expression of type T can be implicitly converted - to a delegate of type void delegate(), - and such - is considered a conversion match for overloading purposes. -
- -exp is converted by replacing it with:
- -
- T delegate() { return exp; }
- or:
- void delegate() { return exp; }
-This means that the following two functions will be - indistinguishable for overloading purposes: -
- -void foo(int x); -void foo(int delegate() dg); -... -void test(int y) -{ - foo(y); // error, matches both foo()'s -} -- -But these are distinguisable: -
- -void foo(int x); -void foo(void delegate() dg); -... -void test(int y) -{ - foo(y); // calls foo(int) - foo(3L); // calls foo(void delegate() dg) -} -