How do I mark a function as returning shared object? This won't compile: shared Foo foo () { ... } This does, but looks somewhat awkward to me: shared (shared Foo) foo () { ... } -- Marek Janukowicz