Okay what I meant with overriding was more in cases where you have a
layout.dt that is extended by another template. In a derived project you
then want to use a different layout.dt. This is out of reach of any
object oriented features or whatever means.

Ah, I see the extends syntax is the problem. :-) A not too bad solution would probably be to just call render functions (instead of defining blocks and extending it) in the layout.dt indirectly via delegates passed to the renderLayout method. I think I'll rewrite my current project this way and see how it works out. (The extends syntax did not scale very well for me anyway)

It would look something like this:
D code:
void renderLayout(HttpServerRequest req, HttpServerResponse res, RenderFunc contents, RenderFunc menu) {
mixin(renderDietFileMixin("project.layout.dt", res.bodyWriter));
}

project.layout.dt:

...
#menu

- menu(req, res);

#contents

- contents(req, res);


Now if it weren't for staying compatible with Jade I would simply extend
the Diet template syntax with explicit parameter declarations so that
proper type checking can be done at the call site (and possibly
automatically generating a proper function or another alternative kind
of interface).

I am actually quite fine with doing this explicitly, having vibe generate methods from a signature definition would probably not gain much in terms of code to write, also currently you have the documentation/interface together with the rest of the code.

Best regards,
Robert