Sat, 23 Jan 2010 14:16:47 -0500, bearophile wrote: > dsimcha: >> Multiple return values are a horrible substitute for exceptions, > > But I am waiting for multiple return values in D3, because they are > quite handy if implemented with a nice syntax :-) > > Bye, > bearophile
You can write a string mixin that converts a string like: (a,b) = fun_call(c,d); into fun_call(c,d,a,b); and another one that converts a string for defining functions: (int, int) fun_call(int c, int d) { ... } into void fun_call(int c, int d, out int ret1, out int ret2) { ... } I've personally used the import expression and string mixins + ctfe instead of ordinary D imports to implement rather nice language extensions by parsing the language on module level.