Is there a way to

Adam D Ruppe destructionator at
Sun Sep 11 00:56:39 UTC 2022

On Sunday, 11 September 2022 at 00:32:18 UTC, Kyle Ingraham wrote:
> I can't use default parameters because I want to be able to 
> call the delegate with arguments extracted from a URL path at 
> runtime

Some kind of wrapper might not only be your best option, it might 
be your only option.

Your delegate would be like string callWith(string[][string] 
webArgs) and you can generate a wrapper to convert arguments and 
call the original function.

> I'm mucking about with a custom router for vibe-d and trying to 
> setup the ability for handlers to have different parameter 
> signatures.

I'd be surprised if vibe doesn't already have this built in, my 
web frameworks have since before vibe was born. (my 
implementation btw does the wrapper thing like described above)

More information about the Digitalmars-d-learn mailing list